root/other-projects/gs2-multi-os-merge/RESET-GREENSTONE.sh @ 30904

Revision 23950, 2.0 KB (checked in by davidb, 8 years ago)

Useful scripts to help merge Greenstone installations for different Operating Systems into one unified directory. Useful when putting Greenstone on a USB, for example, to run on a variety of different computers.

Line 
1#!/bin/bash
2
3storedir="`pwd`"
4thisdir="`dirname \"$0\"`"
5thisdir="`cd \"$thisdir\" && pwd`"
6cd "$thisdir"
7source setup.bash
8
9apache_home_os="$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH"
10
11replace_list="conf/extra/httpd-dav.conf \
12            conf/extra/httpd-manual.conf \
13            conf/extra/httpd-autoindex.conf \
14            conf/extra/httpd-vhosts.conf \
15            conf/extra/httpd-ssl.conf \
16            conf/extra/httpd-multilang-errordoc.conf \
17            conf/original/extra/httpd-dav.conf \
18            conf/original/extra/httpd-manual.conf \
19            conf/original/extra/httpd-autoindex.conf \
20            conf/original/extra/httpd-vhosts.conf \
21            conf/original/extra/httpd-ssl.conf \
22            conf/original/extra/httpd-multilang-errordoc.conf \
23            conf/original/httpd.conf\
24            lib/apr-util-1/apr_dbd_odbc.la \
25            lib/apr-util-1/apr_dbd_sqlite3.la \
26            lib/pkgconfig/apr-util-1.pc \
27            lib/pkgconfig/apr-1.pc \
28            lib/libaprutil-1.la \
29            lib/libapr-1.la \
30            build/config_vars.mk \
31            build/config.nice \
32            build/apr_rules.mk \
33            bin/apu-1-config \
34            bin/apr-1-config \
35            include/ap_config_auto.h \
36            include/ap_config_layout.h"
37
38for one_file in apachectl envvars envvars-std ; do
39  /bin/cp "$apache_home_os/bin/$one_file.in" "$apache_home_os/bin/$one_file"
40done ;
41
42for one_file in $replace_list ; do
43  /bin/cp "$apache_home_os/$one_file.in" "$apache_home_os/$one_file"
44done
45
46/bin/cp "$apache_home_os/bin/apr-1-config.in" "$apache_home_os/bin/apr-1-config"
47
48/bin/cp "$apache_home_os/bin/apu-1-config.in" "$apache_home_os/bin/apu-1-config"
49
50/bin/cp "$apache_home_os/build/config_vars.mk.in" "$apache_home_os/build/config_vars.mk"
51
52bash "$apache_home_os/install-bindist.sh" "$apache_home_os"
53
54log4jprop=$GSDLHOME/lib/java/log4j.properties
55sed "s^@gsdl2home@^$GSDLHOME^g" "$log4jprop.in" > "$log4jprop"
56
57/bin/rm $GSDLHOME/cgi-bin/$GSDLOS$GSDLARCH/gsdlsite.cfg
58$GSDLHOME/gsicontrol.sh configure-web
59
60cd "$storedir"
Note: See TracBrowser for help on using the browser.