root/other-projects/gs2-multi-os-merge/RESET-GREENSTONE.bat @ 32106

Revision 23950, 0.8 KB (checked in by davidb, 9 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@echo off
2
3set startdir=%CD%
4cd /d "%~dp0"
5
6call setup.bat
7
8echo %GSDLHOME%
9
10
11:: Regenerate log4j.properites in lib\java, used by gs2-server.bat
12set sed=%GSDLHOME%\bin\windows\sed.exe
13set log4jprop=%GSDLHOME%\lib\java\log4j.properties
14
15
16:: Convert GSDLHOME to Unix style slashes, for Log4j config file
17for /F "delims=" %%i IN ('call backslashes-to-forwardslashes.bat %GSDLHOME%') do @set GSDLHOMEUNIX=%%i
18
19
20::for /F "delims=" %%i IN ('call "escape-backslashes.bat" %GSDLHOME%') do @set GSDLHOMEESC=%%i
21
22
23::"%sed%" "s^@gsdl2home@^%GSDLHOMEESC%^g" "%log4jprop%.in" > "%log4jprop%"
24
25sed "s^@gsdl2home@^%GSDLHOMEUNIX%^g" "%log4jprop%.in" > "%log4jprop%"
26
27
28del %GSDLHOME%\cgi-bin\windows\gsdlsite.cfg
29%GSDLHOME%\gsicontrol.bat configure-web
30
31
32cd "%startdir%"
33set startdir=
34
Note: See TracBrowser for help on using the browser.