mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 15:04:42 +00:00
bug-fix: uninstall raycast leftovers (#404)
This commit is contained in:
@@ -1091,6 +1091,32 @@ find_app_files() {
|
|||||||
[[ "$bundle_id" =~ microsoft.*vscode ]] && [[ -d ~/.vscode ]] && files_to_clean+=("$HOME/.vscode")
|
[[ "$bundle_id" =~ microsoft.*vscode ]] && [[ -d ~/.vscode ]] && files_to_clean+=("$HOME/.vscode")
|
||||||
[[ "$app_name" =~ Docker ]] && [[ -d ~/.docker ]] && files_to_clean+=("$HOME/.docker")
|
[[ "$app_name" =~ Docker ]] && [[ -d ~/.docker ]] && files_to_clean+=("$HOME/.docker")
|
||||||
|
|
||||||
|
# 7. Raycast
|
||||||
|
if [[ "$bundle_id" == "com.raycast.macos" ]]; then
|
||||||
|
local raycast_parents=(
|
||||||
|
"$HOME/Library/Application Support"
|
||||||
|
"$HOME/Library/Application Scripts"
|
||||||
|
"$HOME/Library/Containers"
|
||||||
|
)
|
||||||
|
for parent in "${raycast_parents[@]}"; do
|
||||||
|
[[ -d "$parent" ]] || continue
|
||||||
|
while IFS= read -r -d '' p; do
|
||||||
|
files_to_clean+=("$p")
|
||||||
|
done < <(command find "$parent" -maxdepth 1 -type d -iname "*raycast*" -print0 2> /dev/null)
|
||||||
|
done
|
||||||
|
if [[ -d "$HOME/Library/Caches" ]]; then
|
||||||
|
while IFS= read -r -d '' p; do
|
||||||
|
files_to_clean+=("$p")
|
||||||
|
done < <(command find "$HOME/Library/Caches" -maxdepth 2 -type d -iname "*raycast*" -print0 2> /dev/null)
|
||||||
|
fi
|
||||||
|
local code_storage="$HOME/Library/Application Support/Code/User/globalStorage"
|
||||||
|
if [[ -d "$code_storage" ]]; then
|
||||||
|
while IFS= read -r -d '' p; do
|
||||||
|
files_to_clean+=("$p")
|
||||||
|
done < <(command find "$code_storage" -maxdepth 1 -type d -iname "*raycast*" -print0 2> /dev/null)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Output results
|
# Output results
|
||||||
if [[ ${#files_to_clean[@]} -gt 0 ]]; then
|
if [[ ${#files_to_clean[@]} -gt 0 ]]; then
|
||||||
printf '%s\n' "${files_to_clean[@]}"
|
printf '%s\n' "${files_to_clean[@]}"
|
||||||
@@ -1184,6 +1210,13 @@ find_app_system_files() {
|
|||||||
done < <(command find /private/var/db/receipts -maxdepth 1 \( -name "*$bundle_id*" \) -print0 2> /dev/null)
|
done < <(command find /private/var/db/receipts -maxdepth 1 \( -name "*$bundle_id*" \) -print0 2> /dev/null)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Raycast system-level (*raycast* under /Library/Application Support)
|
||||||
|
if [[ "$bundle_id" == "com.raycast.macos" && -d "/Library/Application Support" ]]; then
|
||||||
|
while IFS= read -r -d '' p; do
|
||||||
|
system_files+=("$p")
|
||||||
|
done < <(command find "/Library/Application Support" -maxdepth 1 -type d -iname "*raycast*" -print0 2> /dev/null)
|
||||||
|
fi
|
||||||
|
|
||||||
local receipt_files=""
|
local receipt_files=""
|
||||||
receipt_files=$(find_app_receipt_files "$bundle_id")
|
receipt_files=$(find_app_receipt_files "$bundle_id")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user