-
Notifications
You must be signed in to change notification settings - Fork 2
/
uninstall.sh
executable file
·51 lines (40 loc) · 953 Bytes
/
uninstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
#
# Uninstall.
# Use ${BASH_SOURCE[0]} if script is not executed by source, else use $0
SOURCE="${BASH_SOURCE[0]:-$0}"
DIR_PATH="$( cd -- "$( dirname -- "$SOURCE" )" >/dev/null 2>&1 && pwd -P )"
source $DIR_PATH/sh_utils/index.sh
main() {
uninstall_tools
uninstall_shell
uninstall_languages
uninstall_pkgmanager
}
uninstall_tools() {
if check_os $OS_MAC; then
brew remove hub shfmt
brew remove tmux wget ffmpeg
brew remove kubectx
fi
}
uninstall_shell() {
ZINIT_DIR="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/"
rm -rf $ZINIT_DIR
}
uninstall_languages() {
if check_os $OS_MAC; then
brew remove --cask temurin
brew remove go
brew remove node yarn
fi
rustup self uninstall
}
uninstall_pkgmanager() {
if check_os $OS_MAC; then
if check_cmd brew; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
fi
fi
}
main "$@"