Skip to content

Commit

Permalink
Fix curl in start.sh to follow redirects, needed for repo name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmkao committed May 23, 2016
1 parent 6305979 commit f523823
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions host/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fi
echo Checking for new version from Github Repo: ${repo}
cd ${installDirectory}
LOCAL_TAG=$(grep repo.version build.number | cut -d = -f 2 | tr -d '\r')
NETWORK_TAG=$(curl -s https://api.github.com/repos/${repo}/releases/latest | grep 'tag_name' | cut -d\" -f4)
NETWORK_TAG=$(curl -L -s https://api.github.com/repos/${repo}/releases/latest | grep 'tag_name' | cut -d\" -f4)

echo Local Tag: ${LOCAL_TAG}
echo Network Tag: ${NETWORK_TAG}
Expand All @@ -106,7 +106,7 @@ if [ -f ${downloadPrefix}.*.zip ]; then
elif [ "${NETWORK_TAG}" != "${LOCAL_TAG}" -o "$2" == "force" ]; then
echo Installing latest version of ${downloadPrefix}: ${NETWORK_TAG}

DL_URL=$(curl -s https://api.github.com/repos/${repo}/releases/latest | grep 'browser_' | cut -d\" -f4 | grep -- -${NETWORK_TAG})
DL_URL=$(curl -L -s https://api.github.com/repos/${repo}/releases/latest | grep 'browser_' | cut -d\" -f4 | grep -- -${NETWORK_TAG})
DL_FILE=${DL_URL##*/}
rm -f "/tmp/${DL_FILE}"
wget -P /tmp "${DL_URL}"
Expand Down

0 comments on commit f523823

Please sign in to comment.