From 20e6fa62a9bc77af6b25bbb2af58f10cd425455b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Greinhofer?= Date: Wed, 25 Mar 2020 15:26:50 -0500 Subject: [PATCH] Update tfe-cli-installer.sh Fixes binary name. --- extras/tfe-cli-installer.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extras/tfe-cli-installer.sh b/extras/tfe-cli-installer.sh index 92f72cb..6395491 100644 --- a/extras/tfe-cli-installer.sh +++ b/extras/tfe-cli-installer.sh @@ -2,12 +2,13 @@ set -euo pipefail # Prepare variables. -REPO=rgreinho/tfe-cli +PROJECT=tfe-cli +REPO=rgreinho/${PROJECT} LATEST_TAG=$(git ls-remote --tags --refs --sort="v:refname" git://github.com/${REPO}.git | tail -n1 | sed 's/.*\///') VERSION=${VERSION:-$LATEST_TAG} PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') OPT_DIR="/usr/local/opt/${REPO}/${VERSION}" -BINARY="tfe-client-${VERSION}-${PLATFORM}-amd64" +BINARY="${PROJECT}-${VERSION}-${PLATFORM}-amd64" export GITHUB_OAUTH_TOKEN=${GITHUB_TOKEN} # Download the binaries. @@ -19,7 +20,7 @@ fetch --repo="https://github.com/${REPO}" \ # Create the simlink SRC="${OPT_DIR}/${BINARY}" -TARGET="/usr/local/bin/tfe-client" +TARGET="/usr/local/bin/${PROJECT}" echo "Updating permissions..." chmod +x "${SRC}" echo "Linking ${SRC} to ${TARGET}..."