From 0131b6388fe8a5e3e4e088fd12724b86bcac4cf7 Mon Sep 17 00:00:00 2001 From: ramon Date: Wed, 27 Apr 2011 17:25:40 +0000 Subject: Corregir errata en detectar nº de revisión del fichero VERSION.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://opengnsys.es/svn/trunk@1917 a21b9725-9963-47de-94b9-378ad31fedc9 --- installer/opengnsys_installer.sh | 5 ++--- 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" -- cgit v1.2.3-18-g5258