From 341674b09831afb78a5298365f71434915563446 Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Tue, 9 Apr 2019 00:45:53 +0800 Subject: [PATCH] Don't remove existing stuff in /tmp --- SongSync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SongSync.sh b/SongSync.sh index afe993b..e0eafd3 100755 --- a/SongSync.sh +++ b/SongSync.sh @@ -85,8 +85,8 @@ if [ "$1" = "apply" ]; then for removal_path in "${!removes[@]}"; do if [ -d "/tmp/${removes[$removal_path]}" ]; then - echo "need to rm /tmp/${removes[$removal_path]}" - rm -rf "/tmp/${removes[$removal_path]}" + echo "/tmp/${removes[$removal_path]} already exists, skipping" + continue fi echo "Moving ${removal_path} to /tmp/${removes[$removal_path]}" -- 2.11.0