-
-
Save kigster/ff6c8cecde62c4cc2eb2650620a1a0d8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash | |
if [[ ! -L lib || ! -L bootstrap ]]; then | |
[[ -z $(which curl) ]] && { | |
printf "Curl is required for this operation. Please install it with\n" | |
printf "brew install curl\n" | |
exit 1 | |
} | |
curl -fsSL "http://bit.ly/bashmatic-bootstrap" | /usr/bin/env bash | |
fi | |
[[ -f lib/Loader.bash ]] && source lib/Loader.bash | |
export find_command= | |
export fabfilter_backup_location="/tmp/fabfilter" | |
export dry_run=0 | |
export prefix="" | |
usage() { | |
printf "\nUSAGE:\n" | |
printf " $0 [ uninstall | delete | remove ] [ -n | --dry-run ] \n" | |
printf " $0 [ show | list ] [ -n | --dry-run ]\n" | |
printf " $0 [ backup ] [ -n | --dry-run ]\n\n" | |
printf "\nDESCRIPTION\n" | |
printf " This script removes all files related to the FabFilter Plugins\n" | |
printf " on a Mac, based on the FAQ instructions here:\n" | |
printf " https://www.fabfilter.com/support/faq/#how-do-i-completely-uninstall-plug-ins-from-my-system\n\n" | |
printf "\nCOMMANDS:\n" | |
printf " show | list — print all folders and files related to FabFilter\n" | |
printf " uninstall | delete | remove — delete all of the matching files\n" | |
printf " backup — copy all related files to a temp folder\n\n" | |
printf "\nFLAGS:\n" | |
printf " -n | --dry-run — instead of running the commands, print them\n" | |
echo | |
exit 0 | |
} | |
while :; do | |
case $1 in | |
-n|--dry-run) | |
shift | |
export dry_run=1 | |
;; | |
uninstall|delete|remove) | |
shift | |
export prefix="sudo " | |
echo "Uninstalling FabFilter Files..." | |
export find_command=' -exec rm -rvf {} \; -print ' | |
;; | |
backup) | |
shift | |
echo "Backing Up FabFilter Files to ${fabfilter_backup_location}..." | |
mkdir -p ${fabfilter_backup_location} | |
export find_command=" -exec cp -rvp {} ${fabfilter_backup_location} \\; -print" | |
;; | |
show|list) | |
shift | |
echo "Showing FabFilter files to be deleted..." | |
export find_command=' -print ' | |
;; | |
-h|--help) | |
shift | |
;; | |
*) | |
break | |
;; | |
esac | |
done | |
declare -a FF_Dirs=( | |
"/Library/Audio/Plug-Ins/Components" | |
"/Library/Audio/Plug-Ins/VST" | |
"/Library/Audio/Plug-Ins/VST3" | |
"/Library/Application Support/Avid/Audio/Plug-Ins" | |
"/Library/Application Support/Digidesign/Plug-Ins" | |
) | |
declare -a FF_Prefs=( | |
"/Users/${USER}/Library/Audio/Presets" | |
"/Users/${USER}/Library/Application Support" | |
) | |
set +e | |
(( ${dry_run} )) && export prefix="echo ${prefix}" | |
for dir in "${FF_Dirs[@]}" "${FF_Prefs[@]}"; do | |
if [[ -d "${dir}" && -n $(find "${dir}" -name "FabFilter*" -depth 1 -type d) ]]; then | |
command="find \"${dir}\" -name 'FabFilter*' -depth 1 -type d ${find_command}" | |
eval "${prefix} ${command}" 2>/dev/null | |
fi | |
done | |
dir="/Users/${USER}/Library/Preferences" | |
command="find \"${dir}\" -name 'com.fabfilter.*' -depth 1 -type f ${find_command}" | |
eval "${prefix} ${command}" 2>/dev/null | |
Does it? No idea.
Does this script also reset the product trials? 🙊
Amazing, thanks!
Shit. Clogs the terminal with unnecessary scripts at startup. Don't download if you don't want to suffer with the removal of unnecessary scripts.
Shit. Clogs the terminal with unnecessary scripts at startup. Don't download if you don't want to suffer with the removal of unnecessary scripts.
You know, if you don't like to see what the script is doing and would rather trust that it doesn't steal your private keys, then be my guest use another script that provides zero output.
This particular shell script relies on the Bashmatic framework that provides a large number of useful helpers this script uses.
Don't want to keep the framework afterward?
rm - rf ~/.bashmatic
And please stop complaining or telling people not to use it just because YOU have a problem with the output.
Thanks for this man. Out of interest, why does it need to access my contacts?