mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 9a5116dc7b45aa631dfe11e1df6ddcea2aeefdd0
parent 1c402b72a7b325e7c0625f5ccf724fef933199d1
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Wed, 17 Feb 2021 08:45:33 +0100

avoid paths

Diffstat:
calendar-backup.sh | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/calendar-backup.sh b/calendar-backup.sh @@ -4,12 +4,13 @@ set -e # run with chronic to avoid spam -cd /mnt/mem/backup/calendar # required to have the right paths in the archive +mkdir -p "$1" +cd "$1" # required to have the right paths in the archive # avoid "file changed as we read it" errors from tar cp -R calendar_current calendar_backup FILE="dump-`date +%s`" tar cf ${FILE}.tar calendar_backup xz ${FILE}.tar -rm -Rvf calendar_backup +rm -Rf calendar_backup