summaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index 689f0d7..a14e832 100755
--- a/install.sh
+++ b/install.sh
@@ -7,6 +7,23 @@ download() {
chmod +x /usr/bin/gotop
}
+uninstall() {
+ rm /usr/bin/gotop
+}
+
+for opt in "$@"; do
+ case $opt in
+ --uninstall)
+ uninstall
+ exit 0
+ ;;
+ *)
+ echo "unknown option: $opt"
+ exit 1
+ ;;
+ esac
+done
+
arch=$(uname -sm)
case "$arch" in
Linux\ *64) download gotop-linux_amd64 ;;