]> arthur.ath.cx Git - backup-script.git/commitdiff
Fix some variable quoting
authorAlexander Barton <alex@barton.de>
Mon, 27 Jul 2015 13:08:55 +0000 (15:08 +0200)
committerAlexander Barton <alex@barton.de>
Tue, 28 Jul 2015 14:07:29 +0000 (16:07 +0200)
This fixes some warnings of shellcheck(1).

bin/backup-script

index ee4ef2431b0a52ebe54e0c9020a170f748f28a22..67758111987339ec83380e1837e154abdb3f4f2d 100755 (executable)
@@ -150,7 +150,7 @@ done
 echo
 
 if [ $# -ge 1 ]; then
-       for s in $@; do
+       for s in "$@"; do
                if [ ! -r "${conf_d}/$s" ]; then
                        echo "$NAME: Can' read \"${conf_d}/$s\"!"
                        exit 1
@@ -158,7 +158,7 @@ if [ $# -ge 1 ]; then
                sys="$sys ${conf_d}/$s"
        done
 else
-       sys=${conf_d}/*
+       sys="${conf_d}/"*
 fi
 
 # check and create PID file