Changeset 22995

Show
Ignore:
Timestamp:
30.09.2010 15:26:54 (9 years ago)
Author:
sjm84
Message:

This extension will now ask for the mysql extension if it is not available when setup.bash is sourced

Location:
gs2-extensions/gsdl-amp/trunk
Files:
2 removed
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/gsdl-amp/trunk/setup.bash

    r22985 r22995  
    1  
    21 
    32extdesc="the Apache-MySql-Php (AMP) Extension" 
    43 
     4full_setup=`pwd`/${BASH_SOURCE} 
     5fulldir=${full_setup%/*} 
     6fulldir=${fulldir%/.} 
     7 
     8failed="false" 
     9 
     10source cascade-make/lib/cascade-lib.bash 
    511 
    612if [ "x$GEXTAMP" = "x" ] ; then 
    7   export GEXTAMP=`pwd` 
     13  export GEXTAMP=$fulldir 
    814  export GEXTAMP_INSTALLED=$GEXTAMP/$GSDLOS 
    915 
     
    1521    export LD_LIBRARY_PATH=$GEXTAMP_INSTALLED/lib:$LD_LIBRARY_PATH 
    1622  fi 
    17  
    1823 
    1924  export APACHE_HTTPD_HOME="$GEXTAMP_INSTALLED"; 
     
    2934  fi 
    3035 
     36  if [ -e $GEXTAMP/packages/CASCADE-MAKE/MYSQL.sh ] ; then 
     37    echo "The MySQL extension extension has already been acquired" 
     38  else 
     39    echo "Attempting to acquire the MySQL extension ..." 
     40    if [ -e ../mysql ] ; then 
     41      cp ../mysql/packages/mysql-*.tar.gz packages/. && cp ../mysql/packages/CASCADE-MAKE/MYSQL.sh packages/CASCADE-MAKE/.  
     42       
     43      if [ $? != "0" ] ; then 
     44        echo "FAILED -- There was an error copying the necessary files" 
     45        failed="true" 
     46      else 
     47        echo "SUCCESS!" 
     48      fi  
     49    else  
     50      echo "FAILED -- The MySQL extension does not exist, please check it out into the extension directory by typing " 
     51      echo "svn co http://svn.greenstone.org/gs2-extensions/mysql-src/trunk mysql" 
     52      failed="true" 
     53    fi 
     54  fi 
    3155 
    3256  extdir=${GEXTAMP##*/} 
     
    3862  fi 
    3963 
    40  
    41   echo "+Your environment is now setup for $extdesc to Greenstone" 
     64  if [ $failed = "true" ] ; then 
     65    echo "+Your environment was not successfully setup for $extdesc to Greenstone"     
     66    GEXTAMP= 
     67  else 
     68    echo "+Your environment is now setup for $extdesc to Greenstone" 
     69  fi 
    4270else 
    4371  echo "+Your environment is already setup for $extdesc to Greenstone"