xmtop/install.sh
2018-02-19 02:00:26 -08:00

31 lines
456 B
Bash
Executable File

#!/bin/bash
VERSION=v1.0
download() {
curl -L https://github.com/cjbassi/gotop/releases/download/$VERSION/${1} > /usr/bin/gotop
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 ;;
esac