summaryrefslogtreecommitdiffstats
path: root/installer/opengnsys_import.sh
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2018-06-12 13:08:52 +0200
committerRamón M. Gómez <ramongomez@us.es>2018-06-12 13:08:52 +0200
commit9815cac93139ec0a4a155934819a887b6436081a (patch)
tree2885c6adab639d6ca71f1a6e87d077024e583ed8 /installer/opengnsys_import.sh
parentc00832504a4a2d0c569850525ed95214a1cffbaa (diff)
#843: Scripts in in^Caller directory use new version file.
Diffstat (limited to 'installer/opengnsys_import.sh')
-rwxr-xr-xinstaller/opengnsys_import.sh6
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."