Changeset 24297 for main/trunk/greenstone2/gsicontrol.sh
- Timestamp:
- 2011-07-20T18:52:50+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/gsicontrol.sh
r24295 r24297 41 41 echo "" >> "$cgibin/gsdlsite.cfg" ; 42 42 sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "$cgibin/gsdlsite.cfg.in" >> "$cgibin/gsdlsite.cfg" ; 43 # preserve the user-assigned collecthome property, if any44 if test -e "$GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; then45 collecthome=`egrep "^collecthome" "$cgibin/gsdlsite.cfg.bak" | awk '{print $2}'` ;46 if test -n $collecthome ; then47 echo "collecthome $collecthome" >> "$cgibin/gsdlsite.cfg" ;48 echo "" >> "$cgibin/gsdlsite.cfg" ;49 fi50 fi51 43 else 52 44 echo "WARNING: Nothing done for make configure-cgi." ; … … 175 167 } 176 168 177 # forces configure-cgi by deleting gsdlsite.cfg 169 # Forces configure-cgi by renaming gsdlsite.cfg 170 # but only if we actually *need* to relocate gsdlhome. 171 # We relocate at all times, except when there is a gsdlsite.cfg file with its 172 # gsdlhome property the same as the current (greenstone installation) directory 178 173 function reset-gsdlhome { 179 174 echo "" ; 175 relocate=yes ; 180 176 if test -e "$GSDLHOME/$cgibin/gsdlsite.cfg" ; then 181 /bin/mv "$GSDLHOME/$cgibin/gsdlsite.cfg" "$GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; 182 echo "**** Regenerating $GSDLHOME/$cgibin/gsdlsite.cfg" ; 183 echo "**** Previous version of file now $GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; 184 fi 185 186 apache_home_os="$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH" 187 188 if test ! -e "$apache_home_os/bin/apachectl.in" ; then 189 make apache-for-dist 190 fi 177 stored_gsdlhome=`egrep "^gsdlhome" "$cgibin/gsdlsite.cfg" | awk '{print $2}'` ; 178 if [ "x$stored_gsdlhome" != "x$GSDLHOME" ]; then 179 /bin/mv "$GSDLHOME/$cgibin/gsdlsite.cfg" "$GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; 180 echo "**** Regenerating $GSDLHOME/$cgibin/gsdlsite.cfg" ; 181 echo "**** Previous version of file now $GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; 182 else 183 relocate= 184 fi 185 fi 191 186 192 replace_list="conf/extra/httpd-dav.conf \ 187 if [ "x$relocate" = "xyes" ]; then 188 apache_home_os="$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH" 189 190 if test ! -e "$apache_home_os/bin/apachectl.in" ; then 191 make apache-for-dist 192 fi 193 194 replace_list="conf/extra/httpd-dav.conf \ 193 195 conf/extra/httpd-manual.conf \ 194 196 conf/extra/httpd-autoindex.conf \ … … 218 220 include/ap_config_layout.h" 219 221 220 221 /bin/cp "$apache_home_os/bin/$one_file.in" "$apache_home_os/bin/$one_file"222 223 224 225 /bin/cp "$apache_home_os/$one_file.in" "$apache_home_os/$one_file"226 227 228 229 230 231 232 233 222 for one_file in apachectl envvars envvars-std ; do 223 /bin/cp "$apache_home_os/bin/$one_file.in" "$apache_home_os/bin/$one_file" 224 done 225 226 for one_file in $replace_list ; do 227 /bin/cp "$apache_home_os/$one_file.in" "$apache_home_os/$one_file" 228 done 229 230 /bin/cp "$apache_home_os/bin/apr-1-config.in" "$apache_home_os/bin/apr-1-config" 231 232 /bin/cp "$apache_home_os/bin/apu-1-config.in" "$apache_home_os/bin/apu-1-config" 233 234 /bin/cp "$apache_home_os/build/config_vars.mk.in" "$apache_home_os/build/config_vars.mk" 235 234 236 # replace template files with active versions. The following will generate a httpd.conf 235 237 # file with placeholder strings, all of which we'll replace shortly hereafter. 236 bash "$apache_home_os/install-bindist.sh" "$apache_home_os" 237 238 log4jprop=$GSDLHOME/lib/java/log4j.properties 239 sed "s^@gsdl2home@^$GSDLHOME^g" "$log4jprop.in" > "$log4jprop" 240 241 for one_file in gs2-server.app gli.app client-gli.app gems.app ; do 242 if test -e "$one_file/Contents/document.wflow" ; then 243 rm -f "$one_file/Contents/document.wflow" 244 fi 245 done 246 247 configure-web $1 238 bash "$apache_home_os/install-bindist.sh" "$apache_home_os" 239 240 log4jprop=$GSDLHOME/lib/java/log4j.properties 241 sed "s^@gsdl2home@^$GSDLHOME^g" "$log4jprop.in" > "$log4jprop" 242 243 for one_file in gs2-server.app gli.app client-gli.app gems.app ; do 244 if test -e "$one_file/Contents/document.wflow" ; then 245 rm -f "$one_file/Contents/document.wflow" 246 fi 247 done 248 249 configure-web $1 250 fi 248 251 } 249 252
Note:
See TracChangeset
for help on using the changeset viewer.