source: main/trunk/greenstone3/ext-cli/get-selfcontained-jdk.bat@ 37510

Last change on this file since 37510 was 37510, checked in by davidb, 14 months ago

DOS script version

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1@echo off
2
3setlocal
4
5set OS_ALLCAPS=WINDOWS
6
7set selfcon_ext=selfcontained-jdk
8set installed_dir=%selfcon_ext%\zulu-jdk11-window-64bit
9
10echo.
11if not exist %selfcon_ext% (
12 echo Checking out from svn: Greenstone3\'s %selfcon_ext% extension
13 svn co https://svn.greenstone.org/gs3-extensions/%selfcon_ext%/trunk %selfcon_ext%
14
15 if %ERRORLEVEL% NEQ 0 (
16 echo Error encountered checking out: 1>&2
17 echo svn co https://svn.greenstone.org/gs3-extensions/$selfcon_ext/trunk $selfcon_ext 1>&2
18 exit 1
19 )
20) else (
21 echo Detected directory '%selfcon_ext%'
22 echo =^> Taken to mean that the svn check-out command has already been run
23)
24
25echo.
26if not exist %installed_dir% (
27 echo Runing the %selfcon_ext%\PREPARE-%OS_ALLCAPS%.bat
28
29 cd %selfcon_ext% && call .\PREPARE-%OS_ALLCAPS%.bat
30
31 if %ERRORLEVEL% NEQ 0 (
32 echo Error encountered running: 1>&2
33 echo cd $selfcon_ext && ./PREPARE-${OS_ALLCAPS}.sh 1>&2
34 exit 1
35 )
36
37) else (
38 echo Detected directory '%installed_dir%'
39 echo =^> Taken to mean that the %selfcon_ext%/PREPARE-%OS_ALLCAPS%.sh command has already been run
40)
41
42
43if "x%JAVA_HOME%" NEQ "x%CD%\%installed_dir%" (
44 echo.
45 echo To use this installed version of JDK, in the top-level Greenstone3 directory run:
46 echo gs3-setup-cli.bat
47 echo.
48) else (
49 echo.
50 echo Detected JAVA_HOME set to \%CD\%/%installed_dir%
51 echo =^> Taken to mean that the %selfcon_ext% SETUP.sh file has been sourced
52)
53
54echo.
55
56endlocal
Note: See TracBrowser for help on using the repository browser.