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

Last change on this file since 27680 was 27680, checked in by davidb, 11 years ago

Embelishment of the web content

  • Property svn:executable set to *
File size: 1.9 KB
RevLine 
[27317]1#!/bin/sh
2
3
[27340]4source $GEXT_AFREPO/AFR-SETUP.sh
[27317]5
6
7has_afrepo_conf=`egrep "^Include conf/httpd-afrepo.conf" "$GEXTAMP_INSTALLED/conf/httpd.conf"`
8
9if [ "x$has_afrepo_conf" = "x" ] ; then
10 # Not currently in file => append it
11
12 echo ""
13 echo "** Appending 'httpd-afrepo.conf' to main Apache config file"
14 echo "Include conf/httpd-afrepo.conf" >> "$GEXTAMP_INSTALLED/conf/httpd.conf"
15fi
16
[27680]17echo ""
18echo "** Regnerating httpd-afrepo.conf"
[27317]19cat "httpd-afrepo.conf.in" \
[27680]20 | sed "s%@4store-http-prefix@%$protocol://$f4store_hostname:$f4store_port%g" > "$GEXTAMP_INSTALLED/conf/httpd-afrepo.conf"
[27317]21
22
[27680]23public_facing_url="$protocol://$public_facing_hostname"
24
25if [ "x$public_facing_port" != "x" ] ; then
26 public_facing_url="$public_facing_url:$public_facing_port"
27fi
28
29if [ "x$public_facing_url_prefix" != "x" ] ; then
30 public_facing_url="$public_facing_url$public_facing_url_prefix"
31fi
32
33public_facing_url="$public_facing_url/"
34
35
36
37public_facing_f4store_url="$protocol://$public_facing_f4store_hostname"
38
39if [ "x$public_facing_f4store_port" != "x" ] ; then
40 public_facing_f4store_url="$public_facing_f4store_url:$public_facing_f4store_port"
41fi
42
43if [ "x$public_facing_f4store_url_prefix" != "x" ] ; then
44 public_facing_f4store_url="$public_facing_f4store_url$public_facing_f4store_url_prefix"
45fi
46
47public_facing_f4store_url="$public_facing_f4store_url/"
48
49
[27317]50echo ""
51echo "** Regenerating AFRepo.class.php"
52cat "AFRepo.GSDLEXT.class.php.in" \
53 | sed "s%@afrepo-http-prefix@%$protocol://$hostname:$port%g" \
[27680]54 | sed "s%@4store-http-prefix@%$protocol://$f4store_hostname:$f4store_port%g" \
55 | sed "s%@public-facing-afrepo-http-prefix@%$public_facing_url%g" \
56 | sed "s%@public-facing-4store-http-prefix@%$public_facing_f4store_url%g" \
57 > "$GEXTAMP_INSTALLED/htdocs/afrepo/AFRepo.class.php"
[27317]58
59
[27680]60
61echo ""
62echo "** Copying static HTML content (images, CSS etc) to htdocs/afrepo"
63/bin/cp -r html/* "$GEXTAMP_INSTALLED/htdocs/afrepo/."
Note: See TracBrowser for help on using the repository browser.