summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2018-12-11 09:58:38 +0100
committerCorentin LABBE <clabbe@baylibre.com>2018-12-11 10:07:16 +0100
commit2bd0840b929f31506c0dc19eb0d9a92975f004bc (patch)
tree95859c2d7c604b9c130f790e613ab42cc10751f8
parentdbb6b647fc421fb9c70620e2fe725cc5546c0702 (diff)
backup: remove backup-latest link
When backup-latest destination exists, the new backup-latest is created inside. The simpliest way fo fix that is to always remove backup-latest before creating it.
-rwxr-xr-xbackup.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/backup.sh b/backup.sh
index 44644f1..3477367 100755
--- a/backup.sh
+++ b/backup.sh
@@ -20,4 +20,5 @@ docker cp $DOCKERID:/root/joboutput.tar.gz $BACKUP_DIR/ || exit $?
docker exec -ti $DOCKERID rm /root/joboutput.tar.gz || exit $?
echo "Backup done in $BACKUP_DIR"
+rm -f backup-latest
ln -sf $BACKUP_DIR backup-latest