summaryrefslogtreecommitdiffstats
path: root/installer/opengnsys_update.sh
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2020-07-21 14:17:07 +0200
committerRamón M. Gómez <ramongomez@us.es>2020-07-21 14:17:07 +0200
commit363defe753c42058849721b304c75757cab34591 (patch)
tree07544ac686f055eaaf467bdca21fcec31b7bdaea /installer/opengnsys_update.sh
parent74c2edc3754b43cfa83c1b70b992415db3b387ab (diff)
#943: Updater also looks for the old version file.
Diffstat (limited to 'installer/opengnsys_update.sh')
-rwxr-xr-xinstaller/opengnsys_update.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index ae424343..952d085c 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -193,9 +193,10 @@ function chooseVersion()
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
+ if [ $REMOTE -eq 1 ] && which jq &>/dev/null && [ -f $INSTALL_TARGET/doc/VERSION.json -o -f $INSTALL_TARGET/doc/VERSION.txt ]; then
# Installed release.
- read -pe INSTVERSION INSTRELEASE <<< $(jq -r '.version+" "+.release' $INSTALL_TARGET/doc/VERSION.json)
+ [ -f $INSTALL_TARGET/doc/VERSION.json ] && read -pe INSTVERSION INSTRELEASE <<< $(jq -r '.version+" "+.release' $INSTALL_TARGET/doc/VERSION.json)
+ [ -f $INSTALL_TARGET/doc/VERSION.txt ] && read -pe INSTVERSION INSTRELEASE <<< $(awk '{print $2,$3}' $INSTALL_TARGET/doc/VERSION.txt)
# Fetch tags (releases) data from GitHub.
while read -pe TAG URL; do
if [[ $TAG =~ ^opengnsys- ]]; then