From 460c7c0b3b58b516a943a08690bffd04f2ec33aa Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Fri, 12 May 2023 17:23:44 +0800 Subject: [PATCH] mkdir if dst not exists --- sync.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sync.sh b/sync.sh index 93fa4c9..fe10f9d 100755 --- a/sync.sh +++ b/sync.sh @@ -40,6 +40,7 @@ do_sync() { then touch "$lock_file" presync "$name" + mkdir -p "$(dirname "$dst")" rsync -avzthP --stats --delete --bwlimit=6000 "$src" "$dst" postsync "$name" $? "$dst" rm "$lock_file"