Fix version Regex in Binary install script

Previous regex was including the "v" in the query, causing the release links to 404, since the filenames in the releases do not contain the "v".
pull/61/head
Santiago Boselli 4 years ago committed by GitHub
parent c16fc03120
commit 9576af6b66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=$(curl --silent "https://api.github.com/repos/miguelmota/cointop/releases/latest" | grep -Po --color=never '"tag_name": "\K.*?(?=")')
VERSION=$(curl --silent "https://api.github.com/repos/miguelmota/cointop/releases/latest" | grep -Po --color=never '"tag_name": ".\K.*?(?=")')
OSNAME="linux"
if [[ $(uname) == 'Darwin' ]]; then
@ -9,7 +9,7 @@ fi
(
cd /tmp
wget https://github.com/miguelmota/cointop/releases/download/${VERSION}/cointop_${VERSION}_${OSNAME}_amd64.tar.gz
wget https://github.com/miguelmota/cointop/releases/download/v${VERSION}/cointop_${VERSION}_${OSNAME}_amd64.tar.gz
tar -xvzf cointop_${VERSION}_${OSNAME}_amd64.tar.gz cointop
sudo mv cointop /usr/local/bin/cointop

Loading…
Cancel
Save