mirror of
https://github.com/mas-cli/mas
synced 2024-11-24 20:43:10 +00:00
6b1903cde9
Partial #638 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
21 lines
433 B
Bash
Executable file
21 lines
433 B
Bash
Executable file
#!/bin/bash -e
|
|
#
|
|
# script/uninstall
|
|
# mas
|
|
#
|
|
# Removes mas from PREFIX.
|
|
#
|
|
|
|
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
|
|
|
|
# Override default prefix path with optional 1st arg
|
|
PREFIX="${1:-"$(brew --prefix)"}"
|
|
|
|
echo "==> 🔥 Uninstalling mas from ${PREFIX}"
|
|
|
|
trash -F "${PREFIX}/bin/mas" || true
|