]> arthur.barton.de Git - backup-script.git/blobdiff - bin/backup-status
backup-status: Remove unused variables
[backup-script.git] / bin / backup-status
index 26cd0cff6c1551b6ad08910f424589b9a892b3cd..092931bb8fbf699c70dc30b403dbb1106c57bda2 100755 (executable)
@@ -53,14 +53,14 @@ Check_Stamp() {
        # $2: padding
 
        if [ -f "$1" ]; then
-               if [ `uname` = "Linux" ]; then
+               if [ "$(uname)" = "Linux" ]; then
                        last=`LC_ALL=C stat "$1" | grep "^Modify: " \
                         | cut -d':' -f2- | cut -d. -f1`
                else
                        last=`LC_ALL=C stat -f "%Sc" "$1"`
                fi
                [ -n "$last" ] && echo "$2  - Date:" $last
-               unset code
+               code=
                source "$1"
                case "$code" in
                  0)    txt=", OK"; ;;
@@ -86,7 +86,7 @@ case "$1" in
 esac
 
 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
@@ -94,7 +94,7 @@ if [ $# -ge 1 ]; then
                sys="$sys ${conf_d}/$s"
        done
 else
-       sys=${conf_d}/*
+       sys="${conf_d}/"*
 fi
 
 [ -r "${conf_d}/backup-script.conf" ] && source "${conf_d}/backup-script.conf"
@@ -117,10 +117,6 @@ for f in $sys; do
        # Read in system configuration file
        source "$f"
 
-       # Validate configuration
-       [ "$system" = "localhost" -o "$system" = "127.0.0.1" ] && local=1
-
-       destdir="$target"
        target="$target/$system"
 
        [ -d "$target" ] || continue