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

29 lines
777 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
2018-05-10 20:54:01 -07:00
VERSION=1.2.15
2018-02-19 00:22:14 -08:00
2018-02-26 12:55:05 -08:00
download() {
2018-04-09 19:02:46 -07:00
archive=gotop_${VERSION}_${1}.tgz
2018-04-09 18:07:36 -07:00
curl -LO https://github.com/cjbassi/gotop/releases/download/$VERSION/$archive
tar xf $archive
rm $archive
2018-02-19 01:59:51 -08:00
}
2018-02-19 18:11:00 -08:00
arch=$(uname -sm)
case "$arch" in
# order matters
2018-04-13 16:14:30 -07:00
Linux\ armv5*) download linux_arm5 ;;
Linux\ armv6*) download linux_arm6 ;;
Linux\ armv7*) download linux_arm7 ;;
Linux\ armv8*) download linux_arm8 ;;
Linux\ aarch64*) download linux_arm8 ;;
Linux\ *64) download linux_amd64 ;;
Linux\ *86) download linux_386 ;;
2018-02-19 18:11:00 -08:00
*)
2018-05-10 23:50:12 -07:00
echo "\
No binary found for your system.
Feel free to request that we prebuild one that works on your system."
2018-02-19 18:11:00 -08:00
exit 1
;;
esac