-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
74 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,75 @@ | ||
@echo off | ||
|
||
set DIRNAME=%~dp0% | ||
set ROOTDIR=%DIRNAME%\.. | ||
set TARGETDIR=%DIRNAME%target | ||
|
||
rem initialization | ||
if not exist %TARGETDIR%\lib ( | ||
echo Build jline with maven before running the demo | ||
goto END | ||
) | ||
|
||
goto :SETUP_CLASSPATH | ||
|
||
: APPEND_TO_CLASSPATH | ||
set filename=%~1 | ||
set cp=%cp%;%TARGETDIR%\lib\%filename% | ||
goto :EOF | ||
|
||
:SETUP_CLASSPATH | ||
set cp=%TARGETDIR%\classes | ||
rem JLINE | ||
pushd %TARGETDIR%\lib | ||
for %%G in (jline-*.jar) do call:APPEND_TO_CLASSPATH %%G | ||
rem Groovy | ||
for %%G in (groovy-*.jar) do call:APPEND_TO_CLASSPATH %%G | ||
for %%G in (ivy-*.jar) do call:APPEND_TO_CLASSPATH %%G | ||
|
||
set "opts=%JLINE_OPTS%" | ||
set "logconf=%DIRNAME%etc\logging.properties" | ||
:RUN_LOOP | ||
if "%1" == "jansi" goto :EXECUTE_JANSI | ||
if "%1" == "jna" goto :EXECUTE_JNA | ||
if "%1" == "debug" goto :EXECUTE_DEBUG | ||
if "%1" == "debugs" goto :EXECUTE_DEBUGS | ||
if "%1" == "verbose" goto :EXECUTE_VERBOSE | ||
if "%1" == "" goto :EXECUTE_MAIN | ||
set "opts=%opts% %~1" | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_JANSI | ||
for %%G in (jansi-*.jar) do call:APPEND_TO_CLASSPATH %%G | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_JNA | ||
for %%G in (jna-*.jar) do call:APPEND_TO_CLASSPATH %%G | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_DEBUG | ||
set "opts=%opts% -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_DEBUGS | ||
set "opts=%opts% -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_VERBOSE | ||
set "logconf=%DIRNAME%etc\logging-verbose.properties" | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_MAIN | ||
popd | ||
|
||
rem Launching Groovy REPL... | ||
echo Launching Groovy REPL... | ||
echo Classpath: %cp% | ||
java -cp %cp% %opts% -Dgosh.home=%DIRNAME% -Djava.util.logging.config.file=%logconf% org.jline.demo.Repl | ||
|
||
@echo off | ||
|
||
set DIRNAME=%~dp0% | ||
set ROOTDIR=%DIRNAME%\.. | ||
set TARGETDIR=%DIRNAME%target | ||
|
||
rem initialization | ||
if not exist %TARGETDIR%\lib ( | ||
echo Build jline with maven before running the demo | ||
goto END | ||
) | ||
|
||
goto :SETUP_CLASSPATH | ||
|
||
: APPEND_TO_CLASSPATH | ||
set filename=%~1 | ||
set cp=%cp%;%TARGETDIR%\lib\%filename% | ||
goto :EOF | ||
|
||
:SETUP_CLASSPATH | ||
set cp=%TARGETDIR%\classes | ||
rem JLINE | ||
pushd %TARGETDIR%\lib | ||
for %%G in (jline-*.jar) do call:APPEND_TO_CLASSPATH %%G | ||
rem Groovy | ||
for %%G in (groovy-*.jar) do call:APPEND_TO_CLASSPATH %%G | ||
for %%G in (ivy-*.jar) do call:APPEND_TO_CLASSPATH %%G | ||
|
||
set "opts=%JLINE_OPTS%" | ||
set "logconf=%DIRNAME%etc\logging.properties" | ||
:RUN_LOOP | ||
if "%1" == "jansi" goto :EXECUTE_JANSI | ||
if "%1" == "jna" goto :EXECUTE_JNA | ||
if "%1" == "debug" goto :EXECUTE_DEBUG | ||
if "%1" == "debugs" goto :EXECUTE_DEBUGS | ||
if "%1" == "verbose" goto :EXECUTE_VERBOSE | ||
if "%1" == "" goto :EXECUTE_MAIN | ||
set "opts=%opts% %~1" | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_JANSI | ||
for %%G in (jansi-*.jar) do call:APPEND_TO_CLASSPATH %%G | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_JNA | ||
for %%G in (jna-*.jar) do call:APPEND_TO_CLASSPATH %%G | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_DEBUG | ||
set "opts=%opts% -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_DEBUGS | ||
set "opts=%opts% -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_VERBOSE | ||
set "logconf=%DIRNAME%etc\logging-verbose.properties" | ||
shift | ||
goto :RUN_LOOP | ||
|
||
:EXECUTE_MAIN | ||
popd | ||
|
||
rem Launching Groovy REPL... | ||
echo Launching Groovy REPL... | ||
echo Classpath: %cp% | ||
java -cp %cp% %opts% -Dgosh.home=%DIRNAME% -Djava.util.logging.config.file=%logconf% org.jline.demo.Repl | ||
|
||
:END |