diff options
Diffstat (limited to 'installer/opengnsys_import.sh')
-rwxr-xr-x | installer/opengnsys_import.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/installer/opengnsys_import.sh b/installer/opengnsys_import.sh index 26b7ede3..b2a9463b 100755 --- a/installer/opengnsys_import.sh +++ b/installer/opengnsys_import.sh @@ -220,12 +220,12 @@ if [ $? -ne 0 ]; then fi # Comprobamos si es la misma versión -OLDVERSION=$(awk '{print $2}' $TMPDIR/VERSION.txt) -NEWVERSION=$(awk '{print $2}' $OPENGNSYS/doc/VERSION.txt) +OLDVERSION=$(jq -r '.version' $TMPDIR/VERSION.json) +NEWVERSION=$(jq -r '.version' $OPENGNSYS/doc/VERSION.json) # FALTA: Comprobar que la versión OLD es menor que la NEW if [ $OLDVERSION != $NEWVERSION ] ; then echo "La versión del servidor no coincide con la del backup." - cat $OPENGNSYS/doc/VERSION.txt $TMPDIR/VERSION.txt + jq -r '[.project, .version, .codename] | join(" ")' $OPENGNSYS/doc/VERSION.json $TMPDIR/VERSION.json read -p "¿Quiere continuar? (y/n): " ANSWER if [ "${ANSWER^^}" != "Y" ]; then echo "Operación cancelada." |