From 3617ab011df8f92c41022e954e748538537e0d6a Mon Sep 17 00:00:00 2001 From: Sun Knudsen Date: Wed, 30 Dec 2020 10:42:27 -0500 Subject: [PATCH] Fixed #11 app-cleaner.sh now moves app data to trash using a single osascript operation --- .../app-cleaner.sh | 5 ++--- .../app-cleaner.sh.sig | Bin 566 -> 566 bytes 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/how-to-clean-uninstall-macos-apps-using-appcleaner-open-source-alternative/app-cleaner.sh b/how-to-clean-uninstall-macos-apps-using-appcleaner-open-source-alternative/app-cleaner.sh index 9119190..d92377e 100755 --- a/how-to-clean-uninstall-macos-apps-using-appcleaner-open-source-alternative/app-cleaner.sh +++ b/how-to-clean-uninstall-macos-apps-using-appcleaner-open-source-alternative/app-cleaner.sh @@ -114,8 +114,7 @@ read -r answer if [ "$answer" = "y" ]; then printf "%s\n" "Moving app data to trash..." sleep 1 - for path in "${paths[@]}"; do - osascript -e "tell application \"Finder\" to delete POSIX file \"$path\"" > /dev/null - done + posixFiles=$(printf ", POSIX file \"%s\"" "${paths[@]}" | awk '{print substr($0,3)}') + osascript -e "tell application \"Finder\" to delete { $posixFiles }" > /dev/null printf "%s\n" "Done" fi diff --git a/how-to-clean-uninstall-macos-apps-using-appcleaner-open-source-alternative/app-cleaner.sh.sig b/how-to-clean-uninstall-macos-apps-using-appcleaner-open-source-alternative/app-cleaner.sh.sig index 6b87aed4805d69a665aec5bc943cd8e66e027ccb..ca9056bd5010577adb9509949da0fa9b0d7bb736 100644 GIT binary patch delta 542 zcmV+(0^$9(1hxc_BY*6ip8yI85Fe*!hAX`j1#RFD|9^w`ojsjOROLMJiYSxcViWWE zy;)ORu37?It@+V;D5n4xfH*p*mq@B-^^=`U+Qf&8%JW#|K(|Xs@Hr`vv0EiqO#&)E-qHee}9d~K$^EY5*uVBe+ZyW7+ktD z>!@mr&@G(AoQL23&@yP9F^yRYvlJKA7**_bISYYTwxQ_sLtGeatb_sS!5E2aNLnTu zmmX<8uEf`Eewr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