From abba83c99b66f8c572932c0abf9be05c50da9459 Mon Sep 17 00:00:00 2001 From: Manuel Date: Mon, 26 Nov 2018 21:09:16 +0100 Subject: [PATCH] Creating symlink from absolute path --- backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 4d79eff..b5be2ba 100755 --- a/backup.sh +++ b/backup.sh @@ -17,7 +17,7 @@ do gzip -f "$FILENAME" echo "==> Creating symlink to latest backup: $(basename "$FILENAME".gz)" rm "$LATEST" 2> /dev/null - cd backup && ln -s $(basename "$FILENAME".gz) $(basename "$LATEST") && cd .. + cd /backup && ln -s $(basename "$FILENAME".gz) $(basename "$LATEST") && cd - else rm -rf "$FILENAME" fi