summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2011-04-27 17:25:40 +0000
committerramon <ramongomez@us.es>2011-04-27 17:25:40 +0000
commit0131b6388fe8a5e3e4e088fd12724b86bcac4cf7 (patch)
tree7379b75edc0a38322bfbc62b80eca37d6b9f5a6b
parent9c9fcf0c67d469993966fe108da90fa7741e291a (diff)
Corregir errata en detectar nº de revisión del fichero VERSION.txt
git-svn-id: https://opengnsys.es/svn/trunk@1917 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-xinstaller/opengnsys_installer.sh5
-rwxr-xr-xinstaller/opengnsys_update.sh8
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"