-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshellscriptlib-windows.bat
More file actions
73 lines (53 loc) · 3.02 KB
/
shellscriptlib-windows.bat
File metadata and controls
73 lines (53 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Library of shell-script procedures for Windows.
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
:: Special management of the echo's state :
:: In this file, the fact of echoing is controled by the variable %shellscriptlib.echo%.
:: Indeed, you may want to debug your own script by setting echo=on, but not debug this file...
:: If you really want to debug this file, then set shellscriptlib.echo=on.
@if defined shellscriptlib.echo echo %shellscriptlib.echo%
:: Must undefine errorlevel to be sure to catch the real errorlevel.
@set errorlevel=
call :dispatch %*
set last_errorlevel=%errorlevel%
:: Now we are leaving this file, we come back under the control of the variable %echo%.
@if defined echo echo %echo%
@exit /B %last_errorlevel%
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:dispatch
@set proc=%1
@shift
@if defined proc goto %proc%
@echo This is a library of shell-script procedures.
@echo Usage :
@echo shellscriptlib :declare_bsf4oorexx_distribution
@echo shellscriptlib declare_bsf4oorexx_svn
@goto :eof
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:declare_bsf4oorexx_distribution
echo Setting environment for bsf4oorexx
if exist "%BSF4OOREXX_HOME%\%BSF4OOREXX_JAR%" call shellscriptlib :prepend_path CLASSPATH "%BSF4OOREXX_HOME%\%BSF4OOREXX_JAR%"
if exist "%BSF4OOREXX_HOME%\lib\%BSF4OOREXX_JAR%" call shellscriptlib :prepend_path CLASSPATH "%BSF4OOREXX_HOME%\lib\%BSF4OOREXX_JAR%"
if exist "%BSF4OOREXX_HOME%\jars\%BSF4OOREXX_JAR%" call shellscriptlib :prepend_path CLASSPATH "%BSF4OOREXX_HOME%\jars\%BSF4OOREXX_JAR%"
call shellscriptlib :prepend_path PATH "%BSF4OOREXX_HOME%"
if exist "%BSF4OOREXX_HOME%\bin" call shellscriptlib :prepend_path PATH "%BSF4OOREXX_HOME%\bin"
:: Equivalent of LD_LIBRARY_PATH
if exist "%BSF4OOREXX_HOME%\lib\%builder_system_arch%" call shellscriptlib :prepend_path PATH "%BSF4OOREXX_HOME%\lib\%builder_system_arch%"
if exist "%BSF4OOREXX_HOME%\lib" call shellscriptlib :prepend_path PATH "%BSF4OOREXX_HOME%\lib"
doskey cdbsf=%BSF4OOREXX_HOME_DRIVE% ^& cd %BSF4OOREXX_HOME%
doskey cdbsf4oorexx=%BSF4OOREXX_HOME_DRIVE% ^& cd %BSF4OOREXX_HOME%
goto :eof
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:declare_bsf4oorexx_svn
echo Setting environment for bsf4oorexx svn
call shellscriptlib :prepend_path CLASSPATH "%BSF4OOREXX_HOME%"
call shellscriptlib :prepend_path CLASSPATH "%BSF4OOREXX_HOME%\jars\janino\commons-compiler.jar"
call shellscriptlib :prepend_path CLASSPATH "%BSF4OOREXX_HOME%\jars\janino\janino.jar"
call shellscriptlib :prepend_path PATH "%BSF4OOREXX_HOME%\bsf4oorexx.dev\bin"
call shellscriptlib :prepend_path PATH "%BSF4OOREXX_HOME%\bsf4oorexx.dev\source_cc\build\%builder_system_arch%\%builder_compiler%\%builder_config%"
doskey cdbsf=%BSF4OOREXX_HOME_DRIVE% ^& cd %BSF4OOREXX_HOME%
doskey cdbsf4oorexx=%BSF4OOREXX_HOME_DRIVE% ^& cd %BSF4OOREXX_HOME%
goto :eof