From 66432fbc1dacb5b32e53967f074b48b2a19ed96b Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 16 Jan 2020 11:38:28 +0100 Subject: #943: Show `master` as the last option in the menu of releases to update. --- installer/opengnsys_update.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'installer/opengnsys_update.sh') diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 76da7d10..b789b1b2 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -185,8 +185,9 @@ function chooseVersion() # Development branch. BRANCH="master" API_URL="https://api.github.com/repos/opengnsys/OpenGnsys/branches/$BRANCH" - RELEASES=( "$BRANCH" ) - DOWNLOADS=( "$API_URL" ) + + RELEASES=( ) + DOWNLOADS=( ) # If updating from a local or very old version, use the default data. if [ $REMOTE -eq 1 ] && which jq &>/dev/null && [ -f $INSTALL_TARGET/doc/VERSION.json ]; then # Installed release. @@ -200,10 +201,13 @@ function chooseVersion() #RELDATE=$(curl -s "$URL" | jq -r '.commit.committer.date | split("-") | join("")[:8]') fi done <<< $(curl -s "$API_URL/../../tags" | jq -r '.[] | .name+" "+.commit.url') + # Add development (master) branch. + RELEASES+=( "$BRANCH" ) + DOWNLOADS+=( "$API_URL" ) # Show selection menu, if needed. if [ ${#RELEASES} > 1 ]; then echo "Installed version: $INSTVERSION $INSTRELEASE" - echo "Versions available for update (\"$BRANCH\" is the last development branch):" + echo "Versions available for update (\"$BRANCH\" is the latest development branch):" PS3="Enter a number: " select opt in "${RELEASES[@]}"; do if [ -n "$opt" ]; then -- cgit v1.2.3-18-g5258