1
0
mirror of https://github.com/cjbassi/gotop.git synced 2025-04-27 13:48:54 +08:00
gotop/download.sh

21 lines
445 B
Bash
Raw Normal View History

2018-02-19 11:30:38 -08:00
#!/usr/bin/env bash
2018-02-19 00:22:14 -08:00
VERSION=1.0.1
2018-02-19 00:22:14 -08:00
2018-02-19 18:11:00 -08:00
install() {
curl -L https://github.com/cjbassi/gotop/releases/download/$VERSION/gotop-$VERSION-${1}.tgz > gotop.tgz
tar xf gotop.tgz
rm gotop.tgz
2018-02-19 01:59:51 -08:00
}
2018-02-19 18:11:00 -08:00
arch=$(uname -sm)
case "$arch" in
2018-02-21 02:37:29 -08:00
Linux\ *64) install linux_amd64 ;;
Linux\ *86) install linux_386 ;;
Darwin\ *64) install darwin_amd64 ;;
2018-02-19 18:11:00 -08:00
*)
echo "No binary found for your system"
2018-02-19 18:11:00 -08:00
exit 1
;;
esac