918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Rev | Line | |
---|
[d22129a] | 1 | #!/bin/bash |
---|
| 2 | # |
---|
| 3 | # Script: opengnsys_compress.sh |
---|
| 4 | # Descripción: Programa para descargar y generar un fichero comprimido con los |
---|
| 5 | # datos de la última revisión de código del Proyecto OpenGnSys. |
---|
| 6 | # Salida: Datos del fichero comprimido generado. |
---|
| 7 | # Versión: 1.0 - Incluido en OpenGnSys 1.0.1 |
---|
| 8 | # Autor: Ramón Gómez, Universidad de Sevilla |
---|
| 9 | # Fecha: 10/05/2011 |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | # Variables |
---|
[1a2fa9d8] | 13 | SVNURL="http://www.opengnsys.es/svn/branches/version1.1/" |
---|
[d22129a] | 14 | SVNREV=$(LANG=C svn info $SVNURL | awk '/Last Changed Rev:/ {print "r"$4}') |
---|
| 15 | |
---|
| 16 | # Descargar repositorio SVN |
---|
| 17 | cd /tmp |
---|
| 18 | rm -fr opengnsys |
---|
| 19 | svn export $SVNURL opengnsys || exit 1 |
---|
[d2154f4] | 20 | |
---|
| 21 | # Asisgnar propietario de los ficheros descargados. |
---|
| 22 | chown -R root.root opengnsys |
---|
| 23 | WARNING=$? |
---|
| 24 | |
---|
[d22129a] | 25 | # Parchear datos de revisión del código. |
---|
| 26 | perl -pi -e "s/$/ $SVNREV/" opengnsys/doc/VERSION.txt |
---|
[d2154f4] | 27 | |
---|
[d22129a] | 28 | # Generar fichero comprimido. |
---|
| 29 | VERSION=$(awk '{print $2"-"$3}' opengnsys/doc/VERSION.txt) |
---|
| 30 | tar cvzf opengnsys-$VERSION.tar.gz opengnsys |
---|
| 31 | rm -fr opengnsys |
---|
[d2154f4] | 32 | |
---|
| 33 | # Revisar salida. |
---|
| 34 | [ $WARNING != 0 ] && echo "*** WARNING: cannot change owner of files to \"root\" user before compressing." |
---|
[d22129a] | 35 | ls -lh $(readlink -e opengnsys-$VERSION.tar.gz) |
---|
| 36 | |
---|
Note: See
TracBrowser
for help on using the repository browser.