diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2020-06-09 11:19:57 +0200 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2020-06-09 11:19:57 +0200 |
commit | 4f6bad9dc5f1f76618a7d54ebf8c623c15a22198 (patch) | |
tree | a4d2c1d25a38cc792d01303e042fd011988c4b5f | |
parent | ae3ba28b99122209520f3454876ff429c221c9be (diff) |
Revert "#959: Fix update bug when obtaining Git tags data."
This reverts commit d4daa3475e859b94226aa081dd7d0765f0be4581.
-rwxr-xr-x | installer/opengnsys_update.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index fb6891f0..b4159795 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -182,7 +182,7 @@ function autoConfigure() # Choose an available version to update. function chooseVersion() { - local RELEASES DOWNLOADS INSTVERSION INSTRELEASE RELDATE + local RELEASES DOWNLOADS INSTVERSION INSTRELEASE # Development branch. BRANCH="master" @@ -198,9 +198,9 @@ function chooseVersion() while read -pe TAG URL; do if [[ $TAG =~ ^opengnsys- ]]; then [ "${TAG#opengnsys-}" \< "${INSTVERSION%pre}" ] && break - RELDATE=$(curl -s "$URL" | jq -r '.commit.committer.date | split("-") | join("")[:8]') - RELEASES+=( "${TAG} ($RELDATE)" ) - DOWNLOADS+=( "$URL" ) + RELEASES+=( "${TAG}" ) + DOWNLOADS+=( "$URL" ) + #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. @@ -210,10 +210,10 @@ function chooseVersion() if [ ${#RELEASES[@]} -gt 1 ]; then echo "Installed version: $INSTVERSION $INSTRELEASE" echo "Versions available for update (\"$BRANCH\" is the latest development branch):" - PS3="Enter a number (CTRL-C to exit): " + PS3="Enter a number: " select opt in "${RELEASES[@]}"; do if [ -n "$opt" ]; then - BRANCH="${opt%% *}" + BRANCH="$opt" API_URL="${DOWNLOADS[REPLY-1]}" break fi |