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

index 17e04817c3cd38d378f6207a69f95cba67b3cc7d..3ce8db15e802af8b0393a2830f43ad7739685777 100755 (executable)
@@ -391,6 +391,13 @@ for f in $sys; do
                source="$source/"
        esac
 
+       # Make sure "target" DOESN'T end with a slash ("/")
+       case "$target" in
+         "*/")
+               target=$( echo "$target" | sed -e 's/\/$//g' )
+               ;;
+       esac
+
        [ "$system" = "$fname" ] \
                && systxt="\"$system\"" \
                || systxt="\"$fname\" [\"$system\"]"