Fix script to determine download location

Fixes: #148

Related to: https://github.com/openfaas/cli.openfaas.com/pull/6

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd) 2021-01-13 14:37:23 +00:00
parent a4a33b8596
commit 1aa7a2a320

View File

@ -12,7 +12,7 @@ export REPO="faasd"
version=""
echo "Finding latest version from GitHub"
version=$(curl -sI https://github.com/$OWNER/$REPO/releases/latest | grep -i location | awk -F"/" '{ printf "%s", $NF }' | tr -d '\r')
version=$(curl -sI https://github.com/$OWNER/$REPO/releases/latest | grep -i "location:" | awk -F"/" '{ printf "%s", $NF }' | tr -d '\r')
echo "$version"
if [ ! $version ]; then