]> arthur.barton.de Git - backup-script.git/commitdiff
Fix code that makes sure "source_root" ends with a slash
authorAlexander Barton <alex@barton.de>
Thu, 28 Apr 2016 11:33:25 +0000 (13:33 +0200)
committerAlexander Barton <alex@barton.de>
Thu, 28 Apr 2016 11:33:25 +0000 (13:33 +0200)
The correct variable is "source_root" (not "source", which isn't used by
subsequent commands in the script), and the code has been bogus anyway ...

bin/backup-script

index 0b5126660f505d10a2c1a99877f8d2de8b36b177..a55367398269df7024d64a2ab05761b7b4a7b06f 100755 (executable)
@@ -451,12 +451,12 @@ for f in "${sys[@]}"; do
                fi
        fi
 
-       # Make sure "source" ends with a slash ("/")
-       case "$source" in
-         "*/")
+       # Make sure "source_root" ends with a slash ("/")
+       case "$source_root" in
+         *"/")
                ;;
-         "*")
-               source="$source/"
+         *)
+               source_root="$source_root/"
        esac
 
        # Make sure "target" DOESN'T end with a slash ("/")