source: main/trunk/greenstone3/ext-cli/get-selfcontained-nodejs.bat@ 37532

Last change on this file since 37532 was 37532, checked in by davidb, 13 months ago

Windows DOS version to get going with NodeJS

  • 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-nodejs
8set installed_dir=%selfcon_ext%\nodejs-windows-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}.bat 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%.bat command has already been run
40)
41
42
43if "x%NODE_HOME%" NEQ "x%CD%\%installed_dir%" (
44 echo.
45 echo To use this installed version of NodeJS, in the top-level Greenstone3 directory run:
46 echo gs3-setup-cli.bat
47 echo.
48) else (
49 echo.
50 echo Detected NODE_HOME set to \%CD\%/%installed_dir%
51 echo =^> Taken to mean that the %selfcon_ext% SETUP.bat file has been sourced
52)
53
54echo.
55
Note: See TracBrowser for help on using the repository browser.