X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fsrsync-incremental;h=9d800b9cd85b7165069200f0f8b5e776e01551d1;hb=b06a2490aa886a533385a2b20bcac9cd1e0e712e;hp=7fe898aa5d058ff46ac7e03fc97e01f8f585f586;hpb=b0d6984392f748d7e4ba2064e379e6d8d4d11180;p=config%2Fdotfiles.git
diff --git a/bin/srsync-incremental b/bin/srsync-incremental
index 7fe898a..9d800b9 100755
--- a/bin/srsync-incremental
+++ b/bin/srsync-incremental
@@ -21,7 +21,7 @@
# along with this program. If not, see .
-set -e
+set -eu
if test "$#" -lt 2; then
echo "Usage: $0 " >&2
@@ -31,10 +31,11 @@ if test "$#" -lt 2; then
fi
-cd "$1" || exit 1
+cd "$1"
shift
# Get absolute path to last backup directory.
+dest=./
for x in backup-*; do
test -d "$x" || continue
dest="../$x" # relative to destination directory