-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstaller.sh
38 lines (30 loc) · 905 Bytes
/
installer.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
#!/usr/bin/env sh
VERSION=1.6.1
# ------------------------------------------------------------------------------
# UpClean v1.6.1 (https://upclean.app) — An update and cleanup script for macOS.
# ------------------------------------------------------------------------------
green="\033[0;32m"
yellow="\033[33m"
reset="\033[0m"
info() {
if [ -n "$1" ]; then
printf "%bUpClean 🧼 %b%s%b has been %s!%b\n" "$green" "$yellow" "$VERSION" "$green" "$1" "$reset"
fi
}
install() {
curl -o upclean https://raw.githubusercontent.com/divspace/upclean/master/upclean.sh
chmod +x upclean
sudo mv -f upclean /usr/local/bin/upclean
touch ~/.upcleanrc
info "$1"
}
uninstall() {
sudo rm -f /usr/local/bin/upclean ~/.upcleanrc
info "uninstalled"
}
case $1 in
"uninstall") uninstall ;;
"update") install "updated" ;;
*) install "installed" ;;
esac
exit 0