From: Cameron Ball Date: Mon, 8 Apr 2019 16:45:53 +0000 (+0800) Subject: Don't remove existing stuff in /tmp X-Git-Url: https://git.cameron1729.xyz/?a=commitdiff_plain;h=341674b09831afb78a5298365f71434915563446;p=GrooveNet.git Don't remove existing stuff in /tmp --- 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]}"