diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2020-01-16 11:38:28 +0100 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2020-01-16 11:38:28 +0100 |
commit | 66432fbc1dacb5b32e53967f074b48b2a19ed96b (patch) | |
tree | ed42e7f0dbcea861eb32e179aa6d4f0916e4981d | |
parent | 5ff4cd2b4abb4012e53d49a70982520381c1aa74 (diff) |
#943: Show `master` as the last option in the menu of releases to update.
-rwxr-xr-x | installer/opengnsys_update.sh | 10 |
1 files changed, 7 insertions, 3 deletions
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 |