summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2009-12-09 16:34:27 +0000
committerramon <ramongomez@us.es>2009-12-09 16:34:27 +0000
commit1e7eaab879de453542dd5a0f5ed89f3d3ba51bde (patch)
tree7948533f6f7305791275b6c88805da333a93627d /installer
parent3fef8e1a9dac7c0c8df4845a6b102172c399085e (diff)
Installador vale para repositorio y descargable; funciones de API compatibles Doxygen.
git-svn-id: https://opengnsys.es/svn/trunk@652 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/ogGenerateDoc.sh6
-rwxr-xr-xinstaller/opengnsys_installer.sh56
2 files changed, 37 insertions, 25 deletions
diff --git a/installer/ogGenerateDoc.sh b/installer/ogGenerateDoc.sh
index c2745652..a6cff1f1 100755
--- a/installer/ogGenerateDoc.sh
+++ b/installer/ogGenerateDoc.sh
@@ -28,11 +28,11 @@ cat > /tmp/doxyfile << EOF
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
-PROJECT_NAME = "OpenGnsys"
+PROJECT_NAME = "OpenGNSys"
PROJECT_NUMBER = 1.0
OUTPUT_DIRECTORY = $2
CREATE_SUBDIRS = YES
-OUTPUT_LANGUAGE = English
+OUTPUT_LANGUAGE = Spanish
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
@@ -331,4 +331,4 @@ SEARCHENGINE = NO
EOF
doxygen /tmp/doxyfile
-fi \ No newline at end of file
+fi
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index 94c95754..f6841514 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -6,19 +6,37 @@
#####################################################################
+
+# Sólo ejecutable por usuario root
+if [ "$(whoami)" != 'root' ]
+then
+ echo "ERROR: this program must run under root privileges!!"
+ exit 1
+fi
+
+# Comprobar si se ha descargado el paquete comprimido (USESVN=0) o sólo el instalador (USESVN=1).
+pushd $(dirname $0) >/dev/null
+PROGRAMDIR=$PWD
+popd >/dev/null
+if [ -d "$PROGRAMDIR/../installer" ]; then
+ USESVN=0
+else
+ USESVN=1
+ SVN_URL=svn://www.informatica.us.es:3690/opengnsys/trunk
+fi
+
WORKDIR=/tmp/opengnsys_installer
+mkdir -p $WORKDIR
+pushd $WORKDIR
+
+INSTALL_TARGET=/opt/opengnsys
LOG_FILE=/tmp/opengnsys_installation.log
# Array con las dependencias
DEPENDENCIES=( subversion apache2 php5 mysql-server php5-mysql nfs-kernel-server dhcp3-server udpcast bittorrent tftp-hpa tftpd-hpa syslinux openbsd-inetd update-inetd build-essential libmysqlclient15-dev wget doxygen graphviz)
-INSTALL_TARGET=/opt/opengnsys
-
MYSQL_ROOT_PASSWORD="passwordroot"
-# conexión al svn
-SVN_URL=svn://www.informatica.us.es:3690/opengnsys/trunk
-
# Datos de base de datos
OPENGNSYS_DATABASE=ogBDAdmin
OPENGNSYS_DB_USER=usuog
@@ -27,18 +45,8 @@ OPENGNSYS_DB_DEFAULTUSER=opengnsys
OPENGNSYS_DB_DEFAULTPASSWD=opengnsys
OPENGNSYS_DB_CREATION_FILE=opengnsys/admin/Database/ogBDAdmin.sql
-USUARIO=`whoami`
-
-if [ $USUARIO != 'root' ]
-then
- echo "ERROR: this program must run under root privileges!!"
- exit 1
-fi
-mkdir -p $WORKDIR
-pushd $WORKDIR
-
#####################################################################
####### Algunas funciones útiles de propósito general:
#####################################################################
@@ -823,7 +831,7 @@ function openGnsysCopyServerFiles () {
echoAndLog "${FUNCNAME}(): copying files to server directories"
- pushd $WORKDIR/opengnsys
+ [ $USESVN ] && pushd $WORKDIR/opengnsys
local i
for (( i = 0; i < ${#SOURCES[@]}; i++ )); do
if [ -f "${SOURCES[$i]}" ]; then
@@ -1027,12 +1035,16 @@ if [ $? -ne 0 ]; then
exit 1
fi
-# Descarga del repositorio de código en directorio temporal
-#svnCheckoutCode $SVN_URL
-svnExportCode $SVN_URL
-if [ $? -ne 0 ]; then
- errorAndLog "Error while getting code from svn"
- exit 1
+# Si es necesario, descarga el repositorio de código en directorio temporal
+if [ $USESVN ]; then
+ #svnCheckoutCode $SVN_URL
+ svnExportCode $SVN_URL
+ if [ $? -ne 0 ]; then
+ errorAndLog "Error while getting code from svn"
+ exit 1
+ fi
+else
+ ln -fs "$(dirname $PROGRAMDIR)" opengnsys
fi
# Compilar código fuente de los servicios de OpenGNSys.