From fe1a0f7fe4278e0240f5c8c2e5fea4fd217a0f35 Mon Sep 17 00:00:00 2001 From: Sun Knudsen Date: Tue, 23 Feb 2021 19:14:06 -0500 Subject: [PATCH] Switched app-cleaner.sh to Bash --- .../app-cleaner.sh | 12 ++++++------ .../app-cleaner.sh.sig | Bin 566 -> 566 bytes 2 files changed, 6 insertions(+), 6 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 82643cd..3927290 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 @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash if [ -z "$1" ]; then printf "%s\n" "Usage: app-cleaner.sh /path/to/app.app" @@ -22,7 +22,7 @@ if [ "$bundle_identifier" = "" ]; then exit 1 fi -printf "%s\n" "Checking for running processes..." +printf "%s\n" "Checking for running processes…" sleep 1 app_name=$(basename $1 .app) @@ -34,7 +34,7 @@ if [ ${#processes[@]} -gt 0 ]; then printf "${red}%s${nc}" "Kill running processes (y or n)? " read -r answer if [ "$answer" = "y" ]; then - printf "%s\n" "Killing running processes..." + printf "%s\n" "Killing running processes…" sleep 1 for process in "${processes[@]}"; do echo $process | awk '{print $1}' | xargs sudo kill 2>&1 | grep -v "No such process" @@ -50,7 +50,7 @@ paths+=($(find /private/var/db/receipts -iname "*$app_name*.bom" -maxdepth 1 -pr paths+=($(find /private/var/db/receipts -iname "*$bundle_identifier*.bom" -maxdepth 1 -prune 2>&1 | grep -v "Permission denied")) if [ ${#paths[@]} -gt 0 ]; then - printf "%s\n" "Saving bill of material logs to desktop..." + printf "%s\n" "Saving bill of material logs to desktop…" sleep 1 for path in "${paths[@]}"; do mkdir -p "$home_dir/Desktop/$app_name" @@ -58,7 +58,7 @@ if [ ${#paths[@]} -gt 0 ]; then done fi -printf "%s\n" "Finding app data..." +printf "%s\n" "Finding app data…" sleep 1 locations=( @@ -116,7 +116,7 @@ printf "%s\n" "${paths[@]}" printf "${red}%s${nc}" "Move app data to trash (y or n)? " read -r answer if [ "$answer" = "y" ]; then - printf "%s\n" "Moving app data to trash..." + printf "%s\n" "Moving app data to trash…" sleep 1 posixFiles=$(printf ", POSIX file \"%s\"" "${paths[@]}" | awk '{print substr($0,3)}') osascript -e "tell application \"Finder\" to delete { $posixFiles }" > /dev/null 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 31ea1cc422652b6185f4f22fa785bb008d3007e4..4dfb69ef2e7f7886d84b49b98026843243260857 100644 GIT binary patch delta 543 zcmV+)0^t3&1hxc_B7a~teOUks2@oHrXND`i69sv55CFiLVxLZ|L58XJV7V(fx$)H- zG8P=6@D`hYf^YPw9;SEGg6rWCMBT?(+|-h{j2C17?Bj75BUccxue^g=FjzrqzS3!L z6cSrC<9@=muUiJYc|c(&BBP>XFyNBO*z&)72e?+ND7uhb$%Y(HKRwu7ZIRQ zP_w9cqd5%vyhXWR9-(v|&ZHsbJo&9k;EQwG>{^NZm1l~W!b5e~Db0NrSFAwc8B#E5xLzmh84LU~FO4MG3_ delta 543 zcmV+)0^t3&1hxc_B7a}_uT2072@oHrXND`i69wwA5C2i2#Bi8+cDQ!y0V`dRUNlN2 zs~jj!@wyOLhl)aYmune_^Is5-Q+Qm{fvgaBzoB!I$zWSCNP-g%Gyqs`mrNvaCnjQk8oSFQ9LIC-7UGZXApmIUoS)>0-hC1pHiR_#M2 zf*B+zel`e?d&y*9&i1t>nY^SFXy|%XNLo^)Iv#TbuRh;g zz3-eXICTNG1Z|O3*HL#RlXd4FvjA|IR-pe6Js$Q*__~MJG@tiOde^Wmy~;UYdQNle zZL%vV!TYj^R$`G%RNkQ*WU0QKmTpki|3`xVFA1S@_J8cC=xYR!6d4v2pe9izjF5NO zPkY=dtBgE@d|Y8q3x0J@t4I7TKDSXYM0EcK6=<}Q6P4Vtm$%vT&7y6Af35rJj-XZq z_~Iz9kt;9pm2s#82q$r@ocgq@fq;|Vce`AjLAu+d6)uM$V&I;e41Ab6L=-Aoh~|j& h(IW!T-WX2dr4t-*DO>$3Qh*l=b1PW8o?`h<9*@u{`zinc