[27255] | 1 |
|
---|
| 2 | extdesc="the afrepo (audio-fingerprinting) Extension"
|
---|
| 3 |
|
---|
| 4 | full_setup=`pwd`/${BASH_SOURCE}
|
---|
| 5 | fulldir=${full_setup%/*}
|
---|
| 6 | fulldir=${fulldir%/.}
|
---|
| 7 |
|
---|
[27263] | 8 | # Dependency of AMP extension => source first
|
---|
| 9 | if [ "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
|
---|
| 17 | fi
|
---|
| 18 |
|
---|
[27255] | 19 | if test -z $GSDLOS ; then
|
---|
| 20 | GSDLOS=`uname -s | tr '[A-Z]' '[a-z]'`
|
---|
| 21 | # check for running bash under Cygwin
|
---|
| 22 | if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
|
---|
| 23 | then
|
---|
| 24 | GSDLOS=windows
|
---|
| 25 | fi
|
---|
| 26 | # check for running bash under MinGW/MSys
|
---|
| 27 | if test "`echo $GSDLOS | sed 's/mingw//'`" != "$GSDLOS" ;
|
---|
| 28 | then
|
---|
| 29 | GSDLOS=windows
|
---|
| 30 | fi
|
---|
| 31 | echo "GSDLOS was not set. Setting it to '$GSDLOS'"
|
---|
| 32 | export GSDLOS
|
---|
| 33 | fi
|
---|
| 34 |
|
---|
| 35 |
|
---|
| 36 | if [ "x$GEXT_AFREPO" = "x" ] ; then
|
---|
| 37 | export GEXT_AFREPO=`pwd`
|
---|
| 38 | export GEXT_AFREPO_INSTALLED=$GEXT_AFREPO/$GSDLOS
|
---|
| 39 |
|
---|
| 40 | if [ -d "$GEXT_AFREPO_INSTALLED/bin/script" ] ; then
|
---|
| 41 | export PATH=$GEXT_AFREPO_INSTALLED/bin/script:$PATH
|
---|
| 42 | fi
|
---|
| 43 |
|
---|
| 44 | if [ -d "$GEXT_AFREPO_INSTALLED/bin" ] ; then
|
---|
| 45 | export PATH=$GEXT_AFREPO_INSTALLED/bin:$PATH
|
---|
| 46 | fi
|
---|
| 47 |
|
---|
| 48 | if [ -d "$GEXT_AFREPO_INSTALLED/lib" ] ; then
|
---|
| 49 | if [ "$GSDLOS" = "linux" ] ; then
|
---|
| 50 | export LD_LIBRARY_PATH=$GEXT_AFREPO_INSTALLED/lib:$GEXT_AFREPO_INSTALLED/lib64:$LD_LIBRARY_PATH
|
---|
| 51 | elif [ "$GSDLOS" = "darwin" ] ; then
|
---|
| 52 | export DYLD_LIBRARY_PATH=$GEXT_AFREPO_INSTALLED/lib:$GEXT_AFREPO_INSTALLED/lib64:$DYLD_LIBRARY_PATH
|
---|
| 53 | fi
|
---|
| 54 | fi
|
---|
| 55 |
|
---|
| 56 | extdir=${GEXT_AFREPO##*/}
|
---|
| 57 |
|
---|
| 58 | if [ "x$GSDLEXTS" = "x" ] ; then
|
---|
| 59 | export GSDLEXTS=$extdir
|
---|
| 60 | else
|
---|
| 61 | export GSDLEXTS=$GSDLEXTS:$extdir
|
---|
| 62 | fi
|
---|
| 63 |
|
---|
| 64 |
|
---|
| 65 | echo "+Your environment is now setup for $extdesc"
|
---|
| 66 | else
|
---|
| 67 | echo "+Your environment is already setup for $extdesc"
|
---|
| 68 | fi
|
---|
[27263] | 69 |
|
---|
| 70 | found_php_bin=0
|
---|
| 71 | if [ "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
|
---|
| 78 | fi
|
---|
| 79 |
|
---|
| 80 | if [ "$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"
|
---|
| 85 | fi
|
---|