mirror of
https://github.com/sunknudsen/privacy-guides.git
synced 2025-02-23 09:13:56 +00:00
Fixed #11
app-cleaner.sh now moves app data to trash using a single osascript operation
This commit is contained in:
parent
00cd60362d
commit
3617ab011d
@ -114,8 +114,7 @@ read -r answer
|
|||||||
if [ "$answer" = "y" ]; then
|
if [ "$answer" = "y" ]; then
|
||||||
printf "%s\n" "Moving app data to trash..."
|
printf "%s\n" "Moving app data to trash..."
|
||||||
sleep 1
|
sleep 1
|
||||||
for path in "${paths[@]}"; do
|
posixFiles=$(printf ", POSIX file \"%s\"" "${paths[@]}" | awk '{print substr($0,3)}')
|
||||||
osascript -e "tell application \"Finder\" to delete POSIX file \"$path\"" > /dev/null
|
osascript -e "tell application \"Finder\" to delete { $posixFiles }" > /dev/null
|
||||||
done
|
|
||||||
printf "%s\n" "Done"
|
printf "%s\n" "Done"
|
||||||
fi
|
fi
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user