clean: improve arg handling

- detect lack of options using actual arg count rather than first arg
   being an empty string.
 - fix string splitting issues by looping properly on "${@}"
 - tidier

Gbp-Dch: Ignore
This commit is contained in:
Lyndon Brown 2020-04-28 16:23:26 +01:00
parent 2d7ff4934d
commit 2d4b2c9e76
1 changed files with 3 additions and 7 deletions

View File

@ -39,17 +39,13 @@ fi
Remove_lockfile
if [ -z "${1}" ]
then
ARGUMENTS="--all"
else
ARGUMENTS="${@}"
if [ $# -eq 0 ]; then
set -- "--all"
fi
STAGEFILES_DIR="$(Stagefiles_dir)"
for ARGUMENT in ${ARGUMENTS}
do
for ARGUMENT in "${@}"; do
case "${ARGUMENT}" in
--all)
"${0}" noauto --chroot