[27262] | 1 | #!/bin/sh
|
---|
| 2 |
|
---|
| 3 | package=afrepo
|
---|
| 4 | version=-git-all-april2013
|
---|
| 5 |
|
---|
| 6 | srcdir=$package$version
|
---|
| 7 |
|
---|
[27266] | 8 | if [ ! -d "$srcdir" ] ; then
|
---|
| 9 | tar xvzf $srcdir.tar.gz
|
---|
| 10 | fi
|
---|
| 11 |
|
---|
[27262] | 12 | echo ""
|
---|
| 13 | echo "+ Testing for existing Greenstone extensions for AMP and echoprint"
|
---|
| 14 |
|
---|
| 15 | if [ "x$GEXTAMP" = "x" ] ; then
|
---|
| 16 | echo ""
|
---|
| 17 | echo "Error: Failed to find PHP-configured Apache httpd (GEXTAMP) extension"
|
---|
| 18 | echo ""
|
---|
| 19 | else
|
---|
| 20 | echo "++ Found GEXTAMP: $GEXTAMP"
|
---|
| 21 | fi
|
---|
| 22 |
|
---|
| 23 | if [ "x$GEXT_ECHOPRINT" = "x" ] ; then
|
---|
| 24 | echo ""
|
---|
| 25 | echo "Error: Failed to find GEXT_ECHOPRINT extension"
|
---|
| 26 | echo ""
|
---|
| 27 | else
|
---|
| 28 | echo "++ Found GEXT_ECHOPRINT: $GEXT_ECHOPRINT"
|
---|
| 29 | fi
|
---|
| 30 |
|
---|
[27264] | 31 | if [ ! -h $GEXTAMP_INSTALLED/htdocs/afrepo ] ; then
|
---|
[27262] | 32 | echo "++ Creating symbolic link GEXTAMP_INSTALLED/htdocs/afrepo -> $srcdir"
|
---|
[27264] | 33 | ln -s `pwd`/$srcdir $GEXTAMP_INSTALLED/htdocs/afrepo
|
---|
[27262] | 34 | fi
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 | echo ""
|
---|
| 38 | echo "What about Override apache settings ?????"
|
---|
| 39 | echo "****** Test to see if 'audiofiles' exists => generate message if not? ==> auto run cmd ???"
|
---|
| 40 |
|
---|
[27264] | 41 |
|
---|
[27287] | 42 | protocol=http
|
---|
| 43 | hostname=`hostname`
|
---|
| 44 | port=`egrep "^Listen" $GEXTAMP_INSTALLED/conf/httpd.conf | awk '{print $2}'`
|
---|
[27264] | 45 |
|
---|
[27287] | 46 | f4store_port=`echo $port+1 | bc`
|
---|
| 47 |
|
---|
| 48 | has_afrepo_conf=`egrep "^Include conf/httpd-afrepo.conf" "$GEXTAMP_INSTALLED/conf/httpd.conf"`
|
---|
| 49 |
|
---|
| 50 | if [ "x$has_afrepo_conf" = "x" ] ; then
|
---|
| 51 | # Not currently in file => append it
|
---|
| 52 |
|
---|
| 53 | echo "Include conf/httpd-afrepo.conf" >> "$GEXTAMP_INSTALLED/conf/httpd.conf"
|
---|
| 54 | fi
|
---|
| 55 |
|
---|
| 56 | cat "httpd-afrepo.conf.in" \
|
---|
| 57 | | sed "s%@4store-http-prefix@%$protocol://$hostname:$f4store_port%g" > "$GEXTAMP_INSTALLED/conf/httpd-afrepo.conf"
|
---|
| 58 |
|
---|
| 59 |
|
---|
| 60 | cat "AFRepo.GSDLEXT.class.php.in" \
|
---|
| 61 | | sed "s%@afrepo-http-prefix@%$protocol://$hostname:$port%g" \
|
---|
| 62 | | sed "s%@4store-http-prefix@%$protocol://$hostname:$f4store_port%g" > "$GEXTAMP_INSTALLED/htdocs/afrepo/AFRepo.class.php"
|
---|
| 63 |
|
---|
| 64 | cat DONE.txt \
|
---|
| 65 | | sed "s%@GEXTAMP_INSTALLED@%$GEXTAMP_INSTALLED%g" \
|
---|
| 66 | | sed "s%@4store-port@%$f4store_port%g" \
|
---|
| 67 | | sed "s%@afrepo-http-prefix@%$protocol://$hostname:$port%g"
|
---|
| 68 |
|
---|