summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2011-04-27 12:04:57 +0000
committerramon <ramongomez@us.es>2011-04-27 12:04:57 +0000
commit9c9fcf0c67d469993966fe108da90fa7741e291a (patch)
treeaa3dbbc4ebeec246e665eef60954b7779fd8a9b2 /installer
parent154edf03d7cc6b77ce829ed8fb39955b92922451 (diff)
Instalador y actualizador incluyen nº de revisión en fichero VERSION.txt
git-svn-id: https://opengnsys.es/svn/trunk@1914 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/opengnsys_installer.sh12
-rwxr-xr-xinstaller/opengnsys_update.sh25
2 files changed, 35 insertions, 2 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index d47ea897..1af41988 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -44,8 +44,8 @@ if [ -d "$PROGRAMDIR/../installer" ]; then
USESVN=0
else
USESVN=1
- SVN_URL="http://$OPENGNSYS_SERVER/svn/trunk/"
fi
+SVN_URL="http://$OPENGNSYS_SERVER/svn/trunk/"
WORKDIR=/tmp/opengnsys_installer
mkdir -p $WORKDIR
@@ -1147,10 +1147,18 @@ function openGnsysConfigure()
function installationSummary()
{
+ # Crear fichero de versión y revisión, si no existe.
+ local VERSIONFILE="$INSTALL_TARGET/doc/VERSION.txt"
+ [ -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
+
+ # Mostrar información.
echo
echoAndLog "OpenGnSys Installation Summary"
echo "=============================="
- echoAndLog "Project version: $(cat $INSTALL_TARGET/doc/VERSION.txt 2>/dev/null)"
+ echoAndLog "Project version: $(cat $VERSIONFILE 2>/dev/null)"
echoAndLog "Installation directory: $INSTALL_TARGET"
echoAndLog "Repository directory: $INSTALL_TARGET/images"
echoAndLog "DHCP configuration file: /etc/dhcp3/dhcpd.conf"
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index e692ff7e..8786e7b2 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -538,6 +538,28 @@ function updateClient()
echoAndLog "${FUNCNAME}(): Client update successfully"
}
+# Resumen de actualización.
+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}')
+
+ [ -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
+
+ echo
+ echoAndLog "OpenGnSys Update Summary"
+ echo "========================"
+ echoAndLog "Project version: $(cat $VERSIONFILE)"
+ echo
+}
+
+
#####################################################################
####### Proceso de actualización de OpenGnSys
@@ -637,6 +659,9 @@ if [ -f /tmp/dstate ]; then
rm -f /tmp/dstate
fi
+# Mostrar resumen de actualización.
+updateSummary
+
#rm -rf $WORKDIR
echoAndLog "OpenGnSys update finished at $(date)"