From a418f075a73e89b55e63c0a89a53cb22fe0665b3 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 3 May 2020 08:46:49 +0000 Subject: [PATCH] fix local name WEBI_CSV --- golang/golang.bash | 8 ++++---- node/node.bash | 12 ++++++------ rg/rg.bash | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/golang/golang.bash b/golang/golang.bash index 44f0176..e5f09d1 100644 --- a/golang/golang.bash +++ b/golang/golang.bash @@ -51,15 +51,15 @@ WEBI_TMP=${WEBI_TMP:-"$(mktemp -d -t webinstall-go.XXXXXXXX)"} # but each script should be testable in its own right if [ -z "${WEBI_PKG_URL:-}" ]; then - release_tab="${WEBI_HOST}/api/releases/go@${WEBI_VERSION:-}.csv?os=$(uname -s)&arch=$(uname -m)&ext=tar&limit=1" + release_tab="${WEBI_HOST}/api/releases/golang@${WEBI_VERSION:-}.csv?os=$(uname -s)&arch=$(uname -m)&ext=tar&limit=1" WEBI_CSV=$(curl -fsSL "$release_tab" -H "User-Agent: $(uname -a)") - WEBI_CHANNEL=$(echo $WEBI_TAB | cut -d ',' -f 3) + WEBI_CHANNEL=$(echo $WEBI_CSV | cut -d ',' -f 3) if [ "error" == "$WEBI_CHANNEL" ]; then echo "could not find release for go v${WEBI_VERSION}" exit 1 fi - WEBI_VERSION=$(echo $WEBI_TAB | cut -d ',' -f 1) - WEBI_PKG_URL=$(echo $WEBI_TAB | cut -d ',' -f 9) + WEBI_VERSION=$(echo $WEBI_CSV | cut -d ',' -f 1) + WEBI_PKG_URL=$(echo $WEBI_CSV | cut -d ',' -f 9) WEBI_PKG_FILE="$WEBI_TMP/$(echo $WEBI_PKG_URL | sed s:.*/::)" fi diff --git a/node/node.bash b/node/node.bash index 2799e04..f4158d8 100644 --- a/node/node.bash +++ b/node/node.bash @@ -67,22 +67,22 @@ http_get() { fi } -WEBI_TAB=$(curl -fsSL "https://webinstall.dev/api/releases/node@${WEBI_VERSION:-}.csv?os=$(uname -s)&arch=$(uname -m)&ext=tar&limit=1" -H "User-Agent: $(uname -a)") -NODEJS_VER=$(echo $WEBI_TAB | cut -d ',' -f 1) -NODEJS_REMOTE=$(echo $WEBI_TAB | cut -d ',' -f 9) +WEBI_CSV=$(curl -fsSL "https://webinstall.dev/api/releases/node@${WEBI_VERSION:-}.csv?os=$(uname -s)&arch=$(uname -m)&ext=tar&limit=1" -H "User-Agent: $(uname -a)") +NODEJS_VER=$(echo $WEBI_CSV | cut -d ',' -f 1) +NODEJS_REMOTE=$(echo $WEBI_CSV | cut -d ',' -f 9) NODEJS_LOCAL="$my_tmp/$(echo $NODEJS_REMOTE | sed s:.*/::)" -NODE_OS="$(echo $WEBI_TAB | cut -d ',' -f 5)" +NODE_OS="$(echo $WEBI_CSV | cut -d ',' -f 5)" ######### # BEGIN # ######### # WEBI_ARCH uses only slightly different names from NODE_ARCH -NODE_OS="$(echo $WEBI_TAB | cut -d ',' -f 5)" +NODE_OS="$(echo $WEBI_CSV | cut -d ',' -f 5)" if [ "macos" == "$NODE_OS" ]; then NODE_OS="darwin" fi -NODE_ARCH="$(echo $WEBI_TAB | cut -d ',' -f 6)" +NODE_ARCH="$(echo $WEBI_CSV | cut -d ',' -f 6)" if [ "amd64" == "$NODE_ARCH" ]; then NODE_ARCH="x64" fi diff --git a/rg/rg.bash b/rg/rg.bash index f7501bd..7c2a825 100644 --- a/rg/rg.bash +++ b/rg/rg.bash @@ -37,13 +37,13 @@ WEBI_TMP=${WEBI_TMP:-"$(mktemp -d -t webinstall-ripgrep.XXXXXXXX)"} if [ -z "${WEBI_PKG_URL:-}" ]; then release_tab="${WEBI_HOST}/api/releases/ripgrep@${WEBI_VERSION:-}.csv?os=$(uname -s)&arch=$(uname -m)&ext=tar&limit=1" WEBI_CSV=$(curl -fsSL "$release_tab" -H "User-Agent: $(uname -a)") - WEBI_CHANNEL=$(echo $WEBI_TAB | cut -d ',' -f 3) + WEBI_CHANNEL=$(echo $WEBI_CSV | cut -d ',' -f 3) if [ "error" == "$WEBI_CHANNEL" ]; then echo "could not find release for ripgrep v${WEBI_VERSION}" exit 1 fi - WEBI_VERSION=$(echo $WEBI_TAB | cut -d ',' -f 1) - WEBI_PKG_URL=$(echo $WEBI_TAB | cut -d ',' -f 9) + WEBI_VERSION=$(echo $WEBI_CSV | cut -d ',' -f 1) + WEBI_PKG_URL=$(echo $WEBI_CSV | cut -d ',' -f 9) WEBI_PKG_FILE="$WEBI_TMP/$(echo $WEBI_PKG_URL | sed s:.*/::)" fi -- 2.25.1