source: main/trunk/greenstone3/ext-cli/get-selfcontained-mvn.bat

Last change on this file was 38513, checked in by davidb, 4 months ago

DOS bat version developed when working on the interative table.

File size: 2.2 KB
Line 
1@echo off
2
3setlocal
4
5set OS_ALLCAPS=WINDOWS
6
7set selfcon_ext=selfcontained-mvn
8set installed_dir=%selfcon_ext%\apache-maven
9
10echo.
11cmd /c .\get-subversion-windows-64bit.bat
12cmd /c .\setup-subversion-windows-64bit.bat
13
14echo.
15
16if not exist selfcontained-jdk (
17 echo.
18 echo Checking for java ...
19 REM java -version > nul 2> nul
20 where java > nul 2> nul
21
22 if %ERRORLEVEL% NEQ 0 (
23 echo.
24 echo Failed to find 'java'
25 echo After 5 seconds, initiating:
26 echo.
27 echo .\get-selfcontained-jdk.bat
28 echo [Press ^C to stop]
29 timeout /t 5 /nobreak >nul
30 .\get-selfcontained-jdk.bat
31 ) else (
32 echo.
33 echo Detected 'java' but it is not the Greenstone3 supplied 'selfcontained-jdk'
34 echo => Recommend running:
35 echo.
36 echo .\get-selfcontained-jdk.bat
37 echo.
38 echo After 5 seconds, continuing with getting ant
39 echo [Press ^C to stop]
40 timeout /t 5 /nobreak >nul
41 )
42)
43
44
45
46echo.
47if not exist %selfcon_ext% (
48 echo Checking out from svn: Greenstone3\'s %selfcon_ext% extension
49 svn co https://svn.greenstone.org/gs3-extensions/%selfcon_ext%/trunk %selfcon_ext%
50
51 if %ERRORLEVEL% NEQ 0 (
52 echo Error encountered checking out: 1>&2
53 echo svn co https://svn.greenstone.org/gs3-extensions/%selfcon_ext%/trunk %selfcon_ext% 1>&2
54 exit /b 1
55 )
56) else (
57 echo Detected directory '%selfcon_ext%'
58 echo =^> Taken to mean that the svn check-out command has already been run
59)
60
61echo.
62if not exist %installed_dir% (
63 echo Runing the %selfcon_ext%\PREPARE-%OS_ALLCAPS%.bat
64
65 cd %selfcon_ext% && call .\PREPARE-%OS_ALLCAPS%.bat
66
67 if %ERRORLEVEL% NEQ 0 (
68 echo Error encountered running: 1>&2
69 echo cd %selfcon_ext% && .\PREPARE-%OS_ALLCAPS%.bat 1>&2
70 exit /b 1
71 )
72
73) else (
74 echo Detected directory '%installed_dir%'
75 echo =^> Taken to mean that the %selfcon_ext%/PREPARE-%OS_ALLCAPS%.bat command has already been run
76)
77
78
79if "x%MAVEN_HOME%" NEQ "x%CD%\%installed_dir%" (
80 echo.
81 echo To use this installed version of Apache Maven, in the top-level Greenstone3 directory run:
82 echo gs3-setup-cli.bat
83 echo.
84) else (
85 echo.
86 echo Detected MAVEN_HOME set to \%CD\%/%installed_dir%
87 echo =^> Taken to mean that the %selfcon_ext% SETUP.bat file has been sourced
88)
89
90echo.
91
92
93endlocal
Note: See TracBrowser for help on using the repository browser.