install.sh doesn't copy to /usr/bin anymore

This commit is contained in:
Caleb Bassi 2018-02-22 14:42:26 -08:00
parent 7c662db8ae
commit d2ecb1cef6
2 changed files with 12 additions and 31 deletions

View File

@ -12,15 +12,14 @@ Built with [gopsutil](https://github.com/shirou/gopsutil), [drawille-go](https:/
Binaries are currently available for 32/64bit Linux and 64bit OSX.
To download the latest binary for your OS into `/usr/bin`, you can run the [install](https://github.com/cjbassi/gotop/blob/master/install.sh) script:
To download the latest binary for your system from GitHub, you can run the [install](https://github.com/cjbassi/gotop/blob/master/install.sh) script:
curl https://raw.githubusercontent.com/cjbassi/gotop/master/install.sh | sudo bash
```
curl https://raw.githubusercontent.com/cjbassi/gotop/master/install.sh | bash
```
If you install this way, starting gotop with the `-u` flag will update if there's a newer version.
Then move `gotop` somewhere into your $PATH.
To uninstall:
sudo rm /usr/bin/gotop
### Arch Linux
@ -28,7 +27,9 @@ Alternatively, if you're on Arch Linux you can install the `gotop` package from
### Source
go get github.com/cjbassi/gotop
```
go get github.com/cjbassi/gotop
```
## Usage
@ -49,7 +50,6 @@ Alternatively, if you're on Arch Linux you can install the `gotop` package from
* `dd`: kill the selected process or process group
* `<left>`/`<right>` and `h`/`l`: zoom in and out of graphs
* `?`: toggles keybind help menu
* `u`: update gotop
### Mouse
@ -71,9 +71,7 @@ Feel free to add a new one. You can use 256 colors, bold, underline, and reverse
* Process List
- memory total goes above 100%
* general
- more themes
- command line option to set polling interval for CPU and mem
- command line updating
- command line option to only show processes, CPU, and mem
- zooming in and out of graphs
- gopsutil issue for darwin i386

View File

@ -2,27 +2,10 @@
VERSION=1.0.1
print_error() {
echo "No binary found for your architecture. If your architecture is compatible with a binary"
echo "that's already on GitHub, you can manually download and install it and open an issue"
echo "saying so. Otherwise, create an issue requesting binaries to be build for your"
echo "architecture and you can build from source in the meantime if you like."
}
install() {
curl -L https://github.com/cjbassi/gotop/releases/download/$VERSION/gotop-$VERSION-${1}.tgz > /tmp/gotop.tgz
tar xf /tmp/gotop.tgz -C /usr/bin
rm /tmp/gotop.tgz
}
update() {
cur_version=$(gotop -v 2>/dev/null)
if [[ $? != 0 ]]; then
download
fi
if (( "${cur_version//.}" < "${VERSION//.}" )); then
download
fi
curl -L https://github.com/cjbassi/gotop/releases/download/$VERSION/gotop-$VERSION-${1}.tgz > gotop.tgz
tar xf gotop.tgz
rm gotop.tgz
}
arch=$(uname -sm)
@ -31,7 +14,7 @@ case "$arch" in
Linux\ *86) install linux_386 ;;
Darwin\ *64) install darwin_amd64 ;;
*)
print_error
echo "No binary found for your system"
exit 1
;;
esac