install now always uses latest release and updated

README with installation instructions
This commit is contained in:
Peter Morton 2023-10-18 00:02:46 -05:00
parent b438f31f89
commit 4dd86376c9
2 changed files with 12 additions and 2 deletions

View File

@ -60,3 +60,9 @@ Using config file: /Users/Peter.Morton/.tps.yaml
## Building
make
## Installing
```shell
curl -sSL https://git.mortons.site/verint.com/tps-cli/raw/branch/main/install.sh | bash
```

8
install.sh Normal file → Executable file
View File

@ -57,11 +57,15 @@ if [ -z "$PLATFORM" ]; then
exit 1
fi
# get latest tag path
TAG_PATH="$(curl -s https://git.mortons.site/verint.com/tps-cli/releases/latest | sed -n 's/^<a.* href="\([^"]*\).*/\1/p')"
TAG_PATH="${TAG_PATH/tag/download}"
if hash wget 2>/dev/null; then
wget https://git.mortons.site/verint.com/tps-cli/releases/download/${VERSION}/tps_${PLATFORM} -O "tps"
wget https://git.mortons.site${TAG_PATH}/tps_${PLATFORM} -O "tps"
else
curl -o "tps" https://git.mortons.site/verint.com/tps-cli/releases/download/${VERSION}/tps_${PLATFORM}
curl -o "tps" https://git.mortons.site${TAG_PATH}/tps_${PLATFORM}
fi
chmod u+x tps