summaryrefslogtreecommitdiffstats
path: root/scripts/library
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/library')
-rw-r--r--scripts/library/parse_options.sh13
1 files changed, 2 insertions, 11 deletions
diff --git a/scripts/library/parse_options.sh b/scripts/library/parse_options.sh
index 8057c288..5ced2606 100644
--- a/scripts/library/parse_options.sh
+++ b/scripts/library/parse_options.sh
@@ -70,17 +70,8 @@ parse_options() {
done
printf " --"
- if [[ -n $unused_options ]]; then
- for i in ${unused_options[@]}; do
- printf ' %s' "$i"
- done
- fi
- if [[ -n $1 ]]; then
- while [[ -n $1 ]]; do
- printf " '%s'" "${1}"
- shift
- done
- fi
+ [[ $unused_options ]] && printf ' %s' "${unused_options[@]}"
+ [[ $1 ]] && printf " '%s'" "$@"
printf "\n"
return $ret