From 363defe753c42058849721b304c75757cab34591 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 21 Jul 2020 14:17:07 +0200 Subject: #943: Updater also looks for the old version file. --- installer/opengnsys_update.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'installer') 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 -- cgit v1.2.3-18-g5258