forked from CAUDesignPattern05/RabbitEscape
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunrabbit.bat
More file actions
executable file
·34 lines (23 loc) · 826 Bytes
/
runrabbit.bat
File metadata and controls
executable file
·34 lines (23 loc) · 826 Bytes
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
@echo off
setlocal
setlocal enableextensions
set jar=
:: Find jar.
for /F "usebackq" %%a in (`dir *.jar /b ^| findstr rabbit-escape-[0-9\.]*jar`) do set jar=%%a 2>nul
echo Looking for jar in current dir: %jar%
if not "%jar%" == "" goto start
cd dist
for /F "usebackq" %%a in (`dir *.jar /b ^| findstr rabbit-escape-[0-9\.]*jar`) do set jar=.\dist\%%a
echo Looking for jar in .\dist: %jar%
cd ..
if not "%jar%" == "" goto start
echo Cannot find rabbit-escape-<version>.jar. Exit.
goto:eof
:start
if "%1" == "swing" (
:: Kludgey, but using shift does not get rid of "swing" if it is the only arg
java -cp %jar% rabbitescape.ui.swing.SwingMain %2 %3 %4 %5 %6 %7 %8 %9
goto:eof
)
:: Default to text ui and utils with all args
java -cp %jar% rabbitescape.ui.text.TextMain %*