1 |
|
---|
2 | extdesc="the Apache-MySql-Php (AMP) Extension"
|
---|
3 |
|
---|
4 | full_setup=`pwd`/${BASH_SOURCE}
|
---|
5 | fulldir=${full_setup%/*}
|
---|
6 | fulldir=${fulldir%/.}
|
---|
7 |
|
---|
8 | failed="false"
|
---|
9 |
|
---|
10 | source cascade-make/lib/cascade-lib.bash
|
---|
11 |
|
---|
12 | if [ "x$GEXTAMP" = "x" ] ; then
|
---|
13 | export GEXTAMP=$fulldir
|
---|
14 | export GEXTAMP_INSTALLED=$GEXTAMP/$GSDLOS
|
---|
15 |
|
---|
16 | export PATH=$GEXTAMP_INSTALLED/bin:$PATH
|
---|
17 |
|
---|
18 | if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
|
---|
19 | export LD_LIBRARY_PATH=$GEXTAMP_INSTALLED/lib
|
---|
20 | else
|
---|
21 | export LD_LIBRARY_PATH=$GEXTAMP_INSTALLED/lib:$LD_LIBRARY_PATH
|
---|
22 | fi
|
---|
23 |
|
---|
24 | export APACHE_HTTPD_HOME="$GEXTAMP_INSTALLED";
|
---|
25 | export COMPILE_UP_APACHE_HTTPD=1
|
---|
26 |
|
---|
27 | if [ -n "$GSDLHOME" ] ; then
|
---|
28 | # see if there is already an apache httpd we can use
|
---|
29 | # override default values if there is
|
---|
30 | if [ -e "$GSDLHOME/apache-httpd/$GSDLOS" ] ; then
|
---|
31 | export APACHE_HTTPD_HOME="$GSDLHOME/apache-httpd/$GSDLOS";
|
---|
32 | export COMPILE_UP_APACHE_HTTPD=0
|
---|
33 | fi
|
---|
34 | fi
|
---|
35 |
|
---|
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
|
---|
55 |
|
---|
56 | extdir=${GEXTAMP##*/}
|
---|
57 |
|
---|
58 | if [ "x$GSDLEXTS" = "x" ] ; then
|
---|
59 | export GSDLEXTS=$extdir
|
---|
60 | else
|
---|
61 | export GSDLEXTS=$GSDLEXTS:$extdir
|
---|
62 | fi
|
---|
63 |
|
---|
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
|
---|
70 | else
|
---|
71 | echo "+Your environment is already setup for $extdesc to Greenstone"
|
---|
72 | fi
|
---|
73 |
|
---|
74 |
|
---|