From 8f5b7eb6235defb37bed5c72c158375a00887e9b Mon Sep 17 00:00:00 2001 From: legrand Date: Wed, 20 Dec 2006 13:12:51 +0000 Subject: [PATCH] git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@99 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/installParadiseo.sh | 318 +++++++++++++++++++++++++------------- 1 file changed, 209 insertions(+), 109 deletions(-) diff --git a/trunk/installParadiseo.sh b/trunk/installParadiseo.sh index e016fe6f2..664ae9c0d 100755 --- a/trunk/installParadiseo.sh +++ b/trunk/installParadiseo.sh @@ -9,7 +9,7 @@ ######################################################################################### # global variables -installStartTime=$SECONDS +installStartTime=$SECONDS resourceKitPath=$PWD TAR_MSG=" " @@ -41,7 +41,63 @@ MPD_COPY_ERROR=115 #Date DATE=`/bin/date '+%Y%m%d%H%M%S'` # create log file -SPY=$PWD/install.${DATE}.log +SPY=$PWD/install-paradiseo.${DATE}.log + +#------------------------------------------------------# +#-- FUNCTION : execute_cmd ---# +#------------------------------------------------------# +#-- PARAMETERS : ---# +#-- $1 : cmd line ---# +#-- $2 : comment ---# +#-- $3 : spy file ---# +#-- $4 : output std file ---# +#-- $5 : error log file ---# +#-- ---# +#------------------------------------------------------# +#-- CODE RETURN : 0 : OK ---# +#-- CODE RETURN : 1 : NOK ---# +#------------------------------------------------------# +function execute_cmd +{ + COMMAND=${1} + COMMENT=${2} + FIC_ESP=${3} + FIC_OUT=${4} + FIC_ERR=${5} + + if [ `echo ${FIC_OUT} | wc -c` -eq 1 ] + then + FIC_OUT=${FIC_ESP} + fi + + if [ `echo ${FIC_ERR} | wc -c` -eq 1 ] + then + FIC_ERR=${FIC_ESP} + fi + + echo "" >> ${FIC_ESP} + echo "[execute_cmd][Begin][`/bin/date +%H:%M:%S`]" >> ${FIC_ESP} + + echo "------------------------------------------------------------------------------------------------------------" >> ${FIC_ESP} + echo "${COMMENT}" >> ${FIC_ESP} + echo "------------------------------------------------------------------------------------------------------------" >> ${FIC_ESP} + echo "${COMMAND}" >> ${FIC_ESP} + + ${COMMAND} >> ${FIC_OUT} 2>> ${FIC_ERR} + + RETURN_CODE=$? + echo "RETURN_CODE : ${RETURN_CODE}" >> ${FIC_ESP} + + if [ ${RETURN_CODE} -eq 0 ] + then + echo " ${COMMENT} OK" >> ${FIC_ESP} + echo "[execute_cmd][End][`/bin/date +%H:%M:%S`]" >> ${FIC_ESP} + return 0 + else + echo " $ERROR_TAG ${COMMENT} NOK" >> ${FIC_ESP} + return 1 + fi +} #------------------------------------------------------# #-- FUNCTION : run_install ---# @@ -56,109 +112,127 @@ SPY=$PWD/install.${DATE}.log function run_install() { installKitPath=$1 + RETURN=0 ########## STEP 0 : introduction ########## clear echo "" - echo -e ' \033[40m\033[1;33m### ParadisEO install starting .... ### \033[0m ' | tee -a $SPY + echo -e ' \033[40m\033[1;33m### ParadisEO install starting .... ### \033[0m ' #sleep 4 - echo | tee -a $SPY - echo "Installing the environment for Paradiseo... this may take about ten minutes to complete. Note that the librairies \"libxml2\" ans \"mpich2\" required for ParadisEO are provided with this package." | tee -a $SPY + echo + echo "Installing the environment for Paradiseo... this may take about 15 minutes to complete. Note that the librairies \"libxml2\" ans \"mpich2\" required for ParadisEO are provided with this package." sleep 3 - echo | tee -a $SPY - echo | tee -a $SPY + echo + echo ########## STEP 1: unpacking paradiseo-eo ########## - echo -e ' \033[40m\033[1;34m# STEP 1 \033[0m ' | tee -a $SPY - echo ' --> Unpacking Paradiseo-EO (Evolving Objects) ...' | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 1 \033[0m ' + echo ' --> Unpacking Paradiseo-EO (Evolving Objects) ...' - tar xvf $resourceKitPath/$LIBS_PATH/$PARADISEO_EO_ARCHIVE --directory $installKitPath >> $TAR_MSG + execute_cmd "tar xvf $resourceKitPath/$LIBS_PATH/$PARADISEO_EO_ARCHIVE --directory $installKitPath" "[1] Unpack Paradiseo-EO" $SPY if [ ! "$?" = "0" ] then - echo '' | tee -a $SPY - echo " Error when unpacking Paradiseo-EO" | tee -a $SPY - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' | tee -a $SPY + echo '' + echo " --> Error when unpacking Paradiseo-EO" + echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $EO_UNPACKING_ERROR else - echo -e ' \033[40m\033[1;34m# STEP 1 OK \033[0m' | tee -a $SPY - echo | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 1 OK \033[0m' + echo fi ########## STEP 2: unpacking libxml2 ########## - echo -e ' \033[40m\033[1;34m# STEP 2 \033[0m ' | tee -a $SPY - echo ' --> Unpacking libxml2 (required for ParadisEO) ...' | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 2 \033[0m ' + echo ' --> Unpacking libxml2 (required for ParadisEO) ...' - tar xvjf $resourceKitPath/$LIBS_PATH/$LIBXML2_ARCHIVE --directory $installKitPath >> $TAR_MSG + execute_cmd "tar xvjf $resourceKitPath/$LIBS_PATH/$LIBXML2_ARCHIVE --directory $installKitPath" "[2] Unpack Libxml2" $SPY if [ ! "$?" = "0" ] then - echo '' | tee -a $SPY - echo " Error when unpacking libxml2" | tee -a $SPY - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' | tee -a $SPY + echo '' + echo " --> Error when unpacking libxml2" + echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $LIBXML_UNPACKING_ERROR else - echo -e ' \033[40m\033[1;34m# STEP 2 OK \033[0m' | tee -a $SPY - echo | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 2 OK \033[0m' + echo fi ########## STEP 3: unpacking mpich2 ########## - echo -e ' \033[40m\033[1;34m# STEP 3 \033[0m ' | tee -a $SPY - echo ' --> Unpacking mpich2 (required for ParadisEO) ...' | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 3 \033[0m ' + echo ' --> Unpacking mpich2 (required for ParadisEO) ...' - tar xzvf $resourceKitPath/$LIBS_PATH/$MPICH2_ARCHIVE --directory $installKitPath >> $TAR_MSG + execute_cmd "tar xzvf $resourceKitPath/$LIBS_PATH/$MPICH2_ARCHIVE --directory $installKitPath" "[3] Unpack Mpich2" $SPY if [ ! "$?" = "0" ] then - echo '' | tee -a $SPY - echo " Error when unpacking mpich2" | tee -a $SPY - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' | tee -a $SPY + echo '' + echo " --> Error when unpacking mpich2" + echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $MPICH_UNPACKING_ERROR else - echo -e ' \033[40m\033[1;34m# STEP 3 OK \033[0m' | tee -a $SPY - echo | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 3 OK \033[0m' + echo fi ########## STEP 4: installing paradiseo-eo ########## - echo -e ' \033[40m\033[1;34m# STEP 4 \033[0m ' | tee -a $SPY - echo ' --> Installing Paradiseo-EO ...' | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 4 \033[0m ' + echo ' --> Installing Paradiseo-EO. Please wait ...' - cd $installKitPath/paradiseo-eo && ./autogen.sh >> $SPY && ./configure >> $SPY && make >> $SPY - if [ ! "$?" = "0" ] + execute_cmd "cd $installKitPath/paradiseo-eo" "[4-1] Go in Paradiseo-EO dir" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "./autogen.sh" "[4-2] Run autogen" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "./configure" "[4-3] Run configure" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "make" "[4-4] Compile ParadisEO-EO" $SPY + RETURN=`expr $RETURN + $?` + if [ ! $(($RETURN)) = 0 ] then - echo '' | tee -a $SPY - echo " Error when installing Paradiseo-EO" | tee -a $SPY - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' | tee -a $SPY + echo '' + echo " --> Error when installing Paradiseo-EO" + echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $EO_INSTALL_ERROR else - echo -e ' \033[40m\033[1;34m# STEP 4 OK \033[0m' | tee -a $SPY - echo | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 4 OK \033[0m' + echo fi ########## STEP 5: installing paradiseo-mo ########## - echo -e ' \033[40m\033[1;34m# STEP 5 \033[0m ' | tee -a $SPY - echo ' --> Installing Paradiseo-MO ...' | tee -a $SPY - - cd $installKitPath/paradiseo-mo && ./autogen.sh --with-EOdir=$installKitPath/paradiseo-eo && make - if [ ! "$?" = "0" ] + echo -e ' \033[40m\033[1;34m# STEP 5 \033[0m ' + echo ' --> Installing Paradiseo-MO. Please wait ...' + + execute_cmd "cd $installKitPath/paradiseo-mo" "[5-1] Go in Paradiseo-MO dir" $SPY + RETURN=$? + execute_cmd "./autogen.sh --with-EOdir=$installKitPath/paradiseo-eo" "[5-2] Run autogen" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "make" "[5-3] Compile ParadisEO-MO" $SPY + RETURN=`expr $RETURN + $?` + if [ ! $(($RETURN)) = 0 ] then - echo '' | tee -a $SPY - echo " Error when installing Paradiseo-MO" | tee -a $SPY - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' | tee -a $SPY + echo '' + echo " --> Error when installing Paradiseo-MO" + echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $MO_INSTALL_ERROR else - echo -e ' \033[40m\033[1;34m# STEP 5 OK \033[0m' | tee -a $SPY - echo | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 5 OK \033[0m' + echo fi ########## STEP 6: installing MOEO ########## echo -e ' \033[40m\033[1;34m# STEP 6 \033[0m ' - echo ' --> Installing Paradiseo-MOEO ...' + echo ' --> Installing Paradiseo-MOEO. Please wait ...' - cd $installKitPath/paradiseo-moeo && ./autogen.sh --with-EOdir=$installKitPath/paradiseo-eo/ --with-MOdir=$installKitPath/paradiseo-mo/ && make - if [ ! "$?" = "0" ] + execute_cmd "cd $installKitPath/paradiseo-moeo" "[6-1] Go in Paradiseo-MOEO dir" $SPY + RETURN=$? + execute_cmd "./autogen.sh --with-EOdir=$installKitPath/paradiseo-eo --with-MOdir=$installKitPath/paradiseo-mo/" "[6-2] Run autogen" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "make" "[6-3] Compile ParadisEO-MOEO" $SPY + RETURN=`expr $RETURN + $?` + if [ ! $(($RETURN)) = 0 ] then echo '' - echo " Error when installing Paradiseo-MOEO" + echo " --> Error when installing Paradiseo-MOEO" echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $MOEO_INSTALL_ERROR else @@ -168,13 +242,22 @@ function run_install() ########## STEP 7: installing LIBXML2 ########## echo -e ' \033[40m\033[1;34m# STEP 7 \033[0m ' - echo ' --> Installing LIBXML2 ...' + echo ' --> Installing LIBXML2. Please wait ...' - mkdir $installKitPath/libxml2 && cd $installKitPath/libxml2-2.6.0/ && ./configure --prefix=$installKitPath/libxml2/ --exec-prefix=$installKitPath/libxml2/ && make && make install - if [ ! "$?" = "0" ] + execute_cmd "mkdir $installKitPath/libxml2" "[7-1] Create libxml2 dir" $SPY + RETURN=$? + execute_cmd "cd $installKitPath/libxml2-2.6.0/" "[7-2] Go in libxml2-2.6.0 dir" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "./configure --prefix=$installKitPath/libxml2/ --exec-prefix=$installKitPath/libxml2/" "[7-3] Run configure for libxml2" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "make" "[7-4] Compile libxml2" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "make install" "[7-5] Run install libxml2 " $SPY + RETURN=`expr $RETURN + $?` + if [ ! $(($RETURN)) = 0 ] then echo '' - echo " Error when installing LIBXML2" + echo " --> Error when installing LIBXML2" echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $LIBXML_INSTALL_ERROR else @@ -184,30 +267,39 @@ function run_install() ########## STEP 8: installing MPICH2 ########## - echo -e ' \033[40m\033[1;34m# STEP 8 \033[0m ' | tee -a $SPY - echo ' --> Installing MPICH2 ...' | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 8 \033[0m ' + echo ' --> Installing MPICH2. Please wait ...' - mkdir $installKitPath/mpich2 && cd $installKitPath/mpich2-1.0.3/ && ./configure --prefix=$installKitPath/mpich2/ && make && make install - if [ ! "$?" = "0" ] + execute_cmd "mkdir $installKitPath/mpich2" "[8-1] Create mpich2 dir" $SPY + RETURN=$? + execute_cmd "cd $installKitPath/mpich2-1.0.3/" "[8-2] Go in mpich2-1.0.3 dir" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "./configure --prefix=$installKitPath/mpich2/" "[8-3] Run configure for mpich2" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "make" "[8-4] Compile mpich2" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "make install" "[8-5] Run install mpich2 " $SPY + RETURN=`expr $RETURN + $?` + if [ ! $(($RETURN)) = 0 ] then - echo '' | tee -a $SPY - echo " Error when installing MPICH2" | tee -a $SPY - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' | tee -a $SPY + echo '' + echo " --> Error when installing MPICH2" + echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $MPICH_INSTALL_ERROR else - echo -e ' \033[40m\033[1;34m# STEP 8 OK \033[0m' | tee -a $SPY - echo | tee -a $SPY + echo -e ' \033[40m\033[1;34m# STEP 8 OK \033[0m' + echo fi ########## STEP 9: removing temp directory for libxml ########## echo -e ' \033[40m\033[1;34m# STEP 9 \033[0m ' echo ' --> Removing libxml2 temp install directory ...' - rm -fr $installKitPath/libxml2-2.6.0 + execute_cmd "rm -fr $installKitPath/libxml2-2.6.0" "[9] Remove Libxml2 temporary directory" $SPY if [ ! "$?" = "0" ] then echo '' - echo " Error when removing $installKitPath/libxml2-2.6.0" + echo " --> Error when removing $installKitPath/libxml2-2.6.0" echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $REMOVE_TEMP_DIRECTORY_ERROR else @@ -219,11 +311,11 @@ function run_install() echo -e ' \033[40m\033[1;34m# STEP 10 \033[0m ' echo ' --> Removing mpich2 temp install directory ...' - rm -fr $installKitPath/mpich2-1.0.3 + execute_cmd "rm -fr $installKitPath/mpich2-1.0.3" "[10] Remove Mpich2 temporary directory" $SPY if [ ! "$?" = "0" ] then echo '' - echo " Error when removing $installKitPath/mpich2-1.0.3" + echo " --> Error when removing $installKitPath/mpich2-1.0.3" echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $REMOVE_TEMP_DIRECTORY_ERROR else @@ -235,20 +327,16 @@ function run_install() echo -e ' \033[40m\033[1;34m# STEP 11 \033[0m ' echo ' --> Configuring environment variables for libxml2 and mpich2 ...' - export LD_LIBRARY_PATH=$installKitPath/libxml2/lib:$LD_LIBRARY_PATH + execute_cmd "echo \"export LD_LIBRARY_PATH=$installKitPath/libxml2/lib:$LD_LIBRARY_PATH\" >> $homePath/.bashrc" "[11-1] Export LD_LIBRARY_PATH variable" $SPY idx=$? - export PATH=$installKitPath/libxml2/bin:$installKitPath/mpich2/bin:$PATH + execute_cmd "echo \"export PATH=$installKitPath/libxml2/bin:$installKitPath/mpich2/bin:$PATH\" >> $homePath/.bashrc" "[11-2] Export PATH variable" $SPY idx=`expr $idx + $?` - echo "export LD_LIBRARY_PATH=$installKitPath/libxml2/lib:$LD_LIBRARY_PATH" >> $homePath/.bashrc - idx=`expr $idx + $?` - echo "export PATH=$installKitPath/libxml2/bin:$installKitPath/mpich2/bin:$PATH" >> $homePath/.bashrc - idx=`expr $idx + $?` - source $homePath/.bashrc + execute_cmd "source $homePath/.bashrc" "[11-3] Export variables" $SPY idx=`expr $idx + $?` if [ ! $(($idx)) = 0 ] then echo '' - echo " Error when configuring environment variables for libxml2 and mpich2" + echo " --> Error when configuring environment variables for libxml2 and mpich2" echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $VAR_CONFIG_ERROR else @@ -259,13 +347,18 @@ function run_install() ######## STEP 12: installing paradiseo-peo ########## echo -e ' \033[40m\033[1;34m# STEP 12 \033[0m ' - echo ' --> Installing Paradiseo-PEO ...' + echo ' --> Installing Paradiseo-PEO. Please wait ...' - cd $installKitPath/paradiseo-peo && ./configure --with-EOdir=$installKitPath/paradiseo-eo/ --with-MOdir=$installKitPath/paradiseo-mo/ --with-MOEOdir=$installKitPath/paradiseo-moeo/ && make - if [ ! "$?" = "0" ] + execute_cmd "cd $installKitPath/paradiseo-peo" "[12-1] Go in Paradiseo-PEO dir" $SPY + RETURN=$? + execute_cmd " ./configure --with-EOdir=$installKitPath/paradiseo-eo/ --with-MOdir=$installKitPath/paradiseo-mo/ --with-MOEOdir=$installKitPath/paradiseo-moeo" "[12-2] Run configure for ParadisEO-PEO" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "make" "[12-3] Compile ParadisEO-PEO " $SPY + RETURN=`expr $RETURN + $?` + if [ ! $(($RETURN)) = 0 ] then echo '' - echo " Error when installing Paradiseo-PEO" + echo " --> Error when installing Paradiseo-PEO" echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $PARADISEO_INSTALL_ERROR else @@ -274,19 +367,27 @@ function run_install() fi - ######## STEP 13: copy .mpd.conf file in your HOME directory or in /etc if you are root (required for mpich2) ########## + ######## STEP 13: copy .mpd.conf file in your HOME directory or in /etc if you are root (required for mpich2) echo -e ' \033[40m\033[1;34m# STEP 13 \033[0m ' echo ' --> Copy .mpd.conf file in your HOME directory or in /etc if you are root (required for mpich2) ...' if [ "$UID" = "0" ] then - cp $resourceKitPath/.mpd.conf /etc && mv /etc/.mpd.conf /etc/mpd.conf && chmod 600 /etc/mpd.conf + execute_cmd "cp $resourceKitPath/.mpd.conf /etc" "[13-1] Copy mpd.conf file in /etc (root)" $SPY + RETURN=$? + execute_cmd "mv /etc/.mpd.conf /etc/mpd.conf" "[13-2] Move .mpd.conf to mpd.conf" $SPY + RETURN=`expr $RETURN + $?` + execute_cmd "chmod 600 /etc/mpd.conf" "[13-3] Change .mpd.conf rights" $SPY + RETURN=`expr $RETURN + $?` else - cp $resourceKitPath/.mpd.conf $homePath/ && chmod 600 $homePath/.mpd.conf + execute_cmd "cp $resourceKitPath/.mpd.conf $HOME" "[13-1] Copy mpd.conf file in in your HOME directory" $SPY + RETURN=$? + execute_cmd "chmod 600 $HOME/.mpd.conf" "[13-2] Change .mpd.conf rights" $SPY + RETURN=`expr $RETURN + $?` fi - if [ ! "$?" = "0" ] + if [ ! $(($RETURN)) = 0 ] then echo '' - echo " Error when copying .mpd.conf file" + echo " --> Error when copying .mpd.conf file" echo -e ' \033[40m\033[1;33m### END ### \033[0m ' return $MPD_COPY_ERROR else @@ -317,60 +418,60 @@ function on_error() case $1 in $EO_UNPACKING_ERROR) echo - echo " An error has occured : impossible to unpack paradiseo-eo archive " + echo " An error has occured : impossible to unpack paradiseo-eo archive.See $SPY for more details" echo " Make sure that eo archive exists in current directory " echo - echo " => To report any problem of for help, please contact paradiseo-help@lists.gforge.inria.fr" + echo " => To report any problem of for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" echo ;; $LIBXML_UNPACKING_ERROR) echo - echo " An error has occured : impossible to unpack libxml2 archive" + echo " An error has occured : impossible to unpack libxml2 archive.See $SPY for more details" echo " Make sure that libxml2 archive exists in current directory" echo - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr" + echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" echo ;; $MPICH_UNPACKING_ERROR) echo - echo " An error has occured : impossible to unpack mpich2 archive" + echo " An error has occured : impossible to unpack mpich2 archive.See $SPY for more details" echo " Make sure that mpich2 archive exists in current directory" echo - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr" + echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" echo ;; $EO_INSTALL_ERROR) echo - echo " An error has occured : impossible to install Paradiseo-EO" - echo "If you need help, please contact paradiseo-help@lists.gforge.inria.fr" + echo " An error has occured : impossible to install Paradiseo-EO.See $SPY for more details" + echo "If you need help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" echo echo ;; $MO_INSTALL_ERROR) echo - echo " An error has occured : impossible to install Paradiseo-MO" - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr" + echo " An error has occured : impossible to install Paradiseo-MO.See $SPY for more details" + echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" echo ;; $MOEO_INSTALL_ERROR) echo - echo " An error has occured : impossible to install Paradiseo-MOEO" - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr" + echo " An error has occured : impossible to install Paradiseo-MOEO.See $SPY for more details" + echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" echo ;; $PARADISEO_INSTALL_ERROR) echo - echo ' An error has occured : impossible to install Paradiseo-PEO' + echo ' An error has occured : impossible to install Paradiseo-PEO.See $SPY for more details' echo ' Make sure you have the required variables in your environment (ex: by using "echo $PATH" for PATH variable) : ' echo ' -LD_LIBRARY_PATH=/libxml2/lib:$LD_LIBRARY_PATH' echo ' -PATH=/libxml2/bin:/mpich2/bin:$PATH' echo - echo ' => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr' + echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" echo ;; *) echo - echo ' => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr' + echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" echo ;; esac } @@ -392,23 +493,22 @@ then exit fi -if [ ! -d $HOME] +if [ ! -d $HOME ] then if [ "$1" == "" ] then echo " Please give a valid path for your home directory (use ./installParadiseo.sh --help for further information)" else homePath=$1 - paradiseoInstall=run_install $PWD - on_error $paradiseoInstall fi else homePath=$HOME - run_install $PWD - paradiseoInstall=$? - on_error $paradiseoInstall fi +# That's it ! +run_install $PWD +paradiseoInstall=$? +on_error $paradiseoInstall