Fix channel not found test

This commit is contained in:
Ben Peddell 2016-09-28 07:34:33 +10:00
parent 95fe90b15f
commit f4a3cfd97d

View File

@ -69,8 +69,8 @@ doUpgradeToolsFromBranch(){
arkstLatestVersion=`curl -s "https://raw.githubusercontent.com/${arkstGithubRepo}/${arkstChannel}/.version"`
arkstLatestCommit=`curl -s "https://api.github.com/repos/${arkstGithubRepo}/git/refs/heads/${arkstChannel}" | sed -n 's/^ *"sha": "\(.*\)",.*/\1/p'`
if [ "$arkstLatestVersion" == "Not Found" ]; then
echo "Channel ${arkstChannel} does not exist"
if [[ "$arkstLatestVersion" == "404: Not Found" ]]; then
echo "Channel '${arkstChannel}' does not exist"
echo
echo "Available channels:"
curl -s "https://api.github.com/repos/${arkstGithubRepo}/git/refs/heads" | sed -n 's|^ *"ref": "refs/heads/\(.*\)",|\1|p'