Show
Ignore:
Timestamp:
28.04.2013 19:59:10 (7 years ago)
Author:
davidb
Message:

Require AMP extension to be sourced before this one.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/afrepo/trunk/src/gs3-setup.sh

    r27255 r27263  
    55fulldir=${full_setup%/*} 
    66fulldir=${fulldir%/.} 
     7 
     8# Dependency of AMP extension => source first 
     9if [ "x$GEXTAMP" = "x" ] ; then 
     10  pushd $fulldir > /dev/null 
     11  if [ -d ../amp/ ] ; then 
     12    store_extdesc=$extdesc 
     13    cd ../amp/ && source ./setup.bash 
     14    extdesc=$store_extdesc 
     15  fi 
     16  popd > /dev/null 
     17fi 
    718 
    819if test -z $GSDLOS ; then 
     
    5667  echo "+Your environment is already setup for $extdesc" 
    5768fi 
     69 
     70found_php_bin=0 
     71if [ "x$GEXTAMP" != "x" ] ; then 
     72 
     73  if [ -d "$GEXTAMP_INSTALLED/htdocs/afrepo/bin" ] ; then 
     74    export PATH=$GEXTAMP_INSTALLED/htdocs/afrepo/bin:$PATH 
     75    echo "+Your environment is now setup to run PHP scripts for $extdesc" 
     76    found_php_bin=1 
     77  fi 
     78fi 
     79 
     80if [ "$found_php_bin" = "0" ] ; then 
     81  echo "+ *** Warning: failed to find Apache's htdocs directory through GEXTAMP_INSTALLED" 
     82  echo "+ ***          to add 'htdocs/afrepo/bin' to PATH to be able to run PHP scripts" 
     83  echo "+ ***          from the command line" 
     84  echo "+ ***          Assuming these scripts are somehow already on your PATH" 
     85fi