root/gs3-extensions/solr/trunk/src/setup.bat @ 24446

Revision 24446, 1.5 KB (checked in by davidb, 8 years ago)

Start of Solr extension for Greenstone3

Line 
1@echo off
2pushd "%CD%"
3CD /D "%~dp0"
4
5set extdesc=the Solr Extension
6
7if "%OS%" == "Windows_NT" goto WinNT
8if "%OS%" == "" goto Win95
9if "%GSDLLANG%" == "en" echo Setup failed - your PATH has not been set
10if "%GSDLLANG%" == "es" echo No se pudo realizar la configuraci¢n - no se ha establecido la RUTA.
11if "%GSDLLANG%" == "fr" echo Ech‚c de l'installation - votre variable PATH n'a pas ‚t‚ ajust‚e
12if "%GSDLLANG%" == "ru" echo “áâ ­®¢ª  ­¥ ã€ « áì - “’œ ­¥ ¡ë« ãáâ ­®¢«¥­
13goto End
14
15:WinNT
16set GEXT_SOLR=%CD%
17set PATH=%GEXT_SOLR%\bin\script;%PATH%
18set PATH=%GEXT_SOLR%\lib;%PATH%
19set GS_CP_SET=yes
20goto Success
21
22:Win95
23if "%1" == "SetEnv" goto Win95Env
24REM We'll invoke a second copy of the command processor to make
25REM sure there's enough environment space
26COMMAND /E:2048 /K %0 SetEnv
27goto End
28
29:Win95Env
30set GEXT_SOLR=%CD%
31set PATH="%GEXT_SOLR%\bin\script";"%PATH%"
32set PATH="%GEXT_SOLR%\lib";"%PATH%"
33set GS_CP_SET=yes
34goto Success
35
36:Success
37
38set fulldir=%~dp0
39
40:: strip off everything up to (and including) ext dir
41set extdir=%fulldir:*ext\=%
42
43:: remove trailing slash
44set extdir=%extdir:\=%
45
46setlocal enabledelayedexpansion
47if "x%GSDLEXTS%" == "x" (
48  set GSDLEXTS=!extdir!
49) else (
50  set GSDLEXTS=!GSDLEXTS!:!extdir!
51)
52endlocal & set GSDLEXTS=%GSDLEXTS%
53
54echo +Your environment is now setup for %extdesc%
55
56:: Back to delayed expansion to avoid problems with environment
57:: variables with brackets in them, such as "Program Files (x86)"
58
59
60:End
61
62popd
Note: See TracBrowser for help on using the browser.