source: gs2-extensions/afrepo/trunk/src/src/INSTALL-PHP.sh@ 27317

Last change on this file since 27317 was 27317, checked in by davidb, 8 years ago

Changes after testing on the jamendo set

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/sh
2
3
4# Edit the following two lines as appropriate
5protocol=http
6hostname=`hostname`
7
8port=`egrep "^Listen" $GEXTAMP_INSTALLED/conf/httpd.conf | awk '{print $2}'`
9
10f4store_port=`echo $port+1 | bc`
11
12has_afrepo_conf=`egrep "^Include conf/httpd-afrepo.conf" "$GEXTAMP_INSTALLED/conf/httpd.conf"`
13
14if [ "x$has_afrepo_conf" = "x" ] ; then
15 # Not currently in file => append it
16
17 echo ""
18 echo "** Appending 'httpd-afrepo.conf' to main Apache config file"
19 echo "Include conf/httpd-afrepo.conf" >> "$GEXTAMP_INSTALLED/conf/httpd.conf"
20fi
21
22cat "httpd-afrepo.conf.in" \
23 | sed "s%@4store-http-prefix@%$protocol://$hostname:$f4store_port%g" > "$GEXTAMP_INSTALLED/conf/httpd-afrepo.conf"
24
25
26echo ""
27echo "** Regenerating AFRepo.class.php"
28cat "AFRepo.GSDLEXT.class.php.in" \
29 | sed "s%@afrepo-http-prefix@%$protocol://$hostname:$port%g" \
30 | sed "s%@4store-http-prefix@%$protocol://$hostname:$f4store_port%g" > "$GEXTAMP_INSTALLED/htdocs/afrepo/AFRepo.class.php"
31
32
33cat DONE.txt \
34 | sed "s%@GEXTAMP_INSTALLED@%$GEXTAMP_INSTALLED%g" \
35 | sed "s%@4store-port@%$f4store_port%g" \
36 | sed "s%@afrepo-http-prefix@%$protocol://$hostname:$port%g"
37
Note: See TracBrowser for help on using the repository browser.