diff options
-rwxr-xr-x | installer/opengnsys_installer.sh | 5 | ||||
-rwxr-xr-x | installer/opengnsys_update.sh | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 1af41988..8b3118ce 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1149,10 +1149,9 @@ function installationSummary() { # Crear fichero de versión y revisión, si no existe. local VERSIONFILE="$INSTALL_TARGET/doc/VERSION.txt" + local REVISION=$(LANG=C svn info $SVN_URL|awk '/Revision:/ {print "r"$2}') [ -f $VERSIONFILE ] || echo "OpenGnSys" >$VERSIONFILE - if ! grep -q "r[0-9]*$" $VERSIONFILE 2>/dev/null; then - LANG=C svn info $SVN_URL|awk '/Revision:/ {print " r"$2}' >>$VERSIONFILE - fi + perl -pi -e "s/($| r[0-9])*/ $REVISION/" $VERSIONFILE # Mostrar información. echo diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 8786e7b2..d5d6fa4a 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -543,14 +543,10 @@ function updateSummary() { # Actualizar fichero de versión y revisión. local VERSIONFILE="$INSTALL_TARGET/doc/VERSION.txt" - local REVISION=$(LANG=C svn info $SVN_URL|awk '/Revision:/ {print " r"$2}') + local REVISION=$(LANG=C svn info $SVN_URL|awk '/Revision:/ {print "r"$2}') [ -f $VERSIONFILE ] || echo "OpenGnSys" >$VERSIONFILE - if grep -q " r[0-9]*$" $VERSIONFILE 2>/dev/null; then - echo " $REVISION" >>$VERSIONFILE - else - perl -pi -e "s/ r[0-9]*/$REVISION/" $VERSIONFILE - fi + perl -pi -e "s/($| r[0-9]*)/ $REVISION/" $VERSIONFILE echo echoAndLog "OpenGnSys Update Summary" |