]> arthur.barton.de Git - backup-script.git/commitdiff
Make sure that "source" does end with a slash ("/")
authorAlexander Barton <alex@barton.de>
Tue, 11 Aug 2015 12:59:02 +0000 (14:59 +0200)
committerAlexander Barton <alex@barton.de>
Tue, 11 Aug 2015 12:59:02 +0000 (14:59 +0200)
bin/backup-script

index e3032e4a6bd7ce21ab8a8fd755bd244d35bb5ae8..17e04817c3cd38d378f6207a69f95cba67b3cc7d 100755 (executable)
@@ -383,6 +383,14 @@ for f in $sys; do
        # Validate configuration
        [ "$system" = "localhost" -o "$system" = "127.0.0.1" ] && local=1
 
+       # Make sure "source" ends with a slash ("/")
+       case "$source" in
+         "*/")
+               ;;
+         "*")
+               source="$source/"
+       esac
+
        [ "$system" = "$fname" ] \
                && systxt="\"$system\"" \
                || systxt="\"$fname\" [\"$system\"]"