1 | #!/bin/sh
|
---|
2 |
|
---|
3 |
|
---|
4 | source $GEXT_AFREPO/AFR-SETUP.sh
|
---|
5 |
|
---|
6 |
|
---|
7 | has_afrepo_conf=`egrep "^Include conf/httpd-afrepo.conf" "$GEXTAMP_INSTALLED/conf/httpd.conf"`
|
---|
8 |
|
---|
9 | if [ "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"
|
---|
15 | fi
|
---|
16 |
|
---|
17 | echo ""
|
---|
18 | echo "** Regnerating httpd-afrepo.conf"
|
---|
19 | cat "etc/httpd-afrepo.conf.in" \
|
---|
20 | | sed "s%@4store-http-prefix@%$protocol://$f4store_hostname:$f4store_port%g" > "$GEXTAMP_INSTALLED/conf/httpd-afrepo.conf"
|
---|
21 |
|
---|
22 |
|
---|
23 | public_facing_url="$protocol://$public_facing_hostname"
|
---|
24 |
|
---|
25 | if [ "x$public_facing_port" != "x" ] ; then
|
---|
26 | public_facing_url="$public_facing_url:$public_facing_port"
|
---|
27 | fi
|
---|
28 |
|
---|
29 | if [ "x$public_facing_url_prefix" != "x" ] ; then
|
---|
30 | public_facing_url="$public_facing_url$public_facing_url_prefix"
|
---|
31 | fi
|
---|
32 |
|
---|
33 | public_facing_url="$public_facing_url/"
|
---|
34 |
|
---|
35 |
|
---|
36 |
|
---|
37 | public_facing_f4store_url="$protocol://$public_facing_f4store_hostname"
|
---|
38 |
|
---|
39 | if [ "x$public_facing_f4store_port" != "x" ] ; then
|
---|
40 | public_facing_f4store_url="$public_facing_f4store_url:$public_facing_f4store_port"
|
---|
41 | fi
|
---|
42 |
|
---|
43 | if [ "x$public_facing_f4store_url_prefix" != "x" ] ; then
|
---|
44 | public_facing_f4store_url="$public_facing_f4store_url$public_facing_f4store_url_prefix"
|
---|
45 | fi
|
---|
46 |
|
---|
47 | public_facing_f4store_url="$public_facing_f4store_url/"
|
---|
48 |
|
---|
49 |
|
---|
50 | echo ""
|
---|
51 | echo "** Regenerating AFRepo.class.php"
|
---|
52 | cat "AFRepo.GSDLEXT.class.php.in" \
|
---|
53 | | sed "s%@afrepo-http-prefix@%$protocol://$hostname:$port%g" \
|
---|
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"
|
---|
58 |
|
---|
59 |
|
---|
60 |
|
---|
61 | echo ""
|
---|
62 | echo "** Copying static HTML content (images, CSS etc) to htdocs/afrepo"
|
---|
63 | #/bin/cp -r html/* "$GEXTAMP_INSTALLED/htdocs/afrepo/."
|
---|
64 |
|
---|
65 | rsync -pav --exclude .svn html/* "$GEXTAMP_INSTALLED/htdocs/afrepo/." |
---|