2018-10-17 21:47:08 +00:00
|
|
|
#!/bin/bash -e
|
2019-01-19 04:37:51 +00:00
|
|
|
#
|
|
|
|
# script/uninstall
|
|
|
|
# mas
|
|
|
|
#
|
2021-05-07 18:33:39 +00:00
|
|
|
# Removes mas from PREFIX.
|
2019-01-19 04:37:51 +00:00
|
|
|
#
|
2018-10-17 21:47:08 +00:00
|
|
|
|
2024-11-16 04:21:37 +00:00
|
|
|
mas_dir="$(readlink -fn "$(dirname "${BASH_SOURCE:-"${0}"}")/..")"
|
|
|
|
|
|
|
|
if ! cd -- "${mas_dir}"; then
|
|
|
|
printf $'Error: Could not cd into mas directory: %s\n' "${mas_dir}" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-01-19 04:37:51 +00:00
|
|
|
# Override default prefix path with optional 1st arg
|
2024-11-16 04:11:51 +00:00
|
|
|
PREFIX="${1:-"$(brew --prefix)"}"
|
2018-10-17 21:47:08 +00:00
|
|
|
|
2024-11-16 02:46:11 +00:00
|
|
|
echo "==> 🔥 Uninstalling mas from ${PREFIX}"
|
2019-01-19 04:37:51 +00:00
|
|
|
|
2024-11-16 02:46:11 +00:00
|
|
|
trash -F "${PREFIX}/bin/mas" || true
|