From 4a7bdaa38b22dba4c865d9ad93e39ee167994757 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 13 Jul 2024 01:42:06 +0100 Subject: [PATCH] Improve speed & robustness of sync_music.sh --- sync_music.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sync_music.sh b/sync_music.sh index 479a520..052ca33 100755 --- a/sync_music.sh +++ b/sync_music.sh @@ -8,8 +8,9 @@ destination="$mountpoint/Internal shared storage/Music/" mkdir "$mountpoint" aft-mtp-mount "$mountpoint" -rsync --archive --delete --info=progress2 "$source" "$destination" - -sync -fusermount -u "$mountpoint" -rmdir "$mountpoint" +rsync --archive --compress --partial --append-verify --delete --info=progress2 "$source" "$destination" && +{ + sync + fusermount -u "$mountpoint" + rmdir "$mountpoint" +}