Skip to content

Commit

Permalink
js/js.bat:
Browse files Browse the repository at this point in the history
Changed paths from dist/selenium/selenium to java for selenium jars.
js.bat:
Fix (simplify) some of the ARGS mangling.

Signed-off-by: rloh <rloh@lyris.com>
  • Loading branch information
rloh committed Sep 29, 2010
1 parent 9c8c593 commit 53fc5e2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
8 changes: 4 additions & 4 deletions js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@

if [ $# -eq 0 ]
then
java -cp steal/rhino/js.jar:funcunit/dist/selenium/selenium/selenium-java-client-driver.jar org.mozilla.javascript.tools.shell.Main
java -cp steal/rhino/js.jar:funcunit/java/selenium-java-client-driver.jar org.mozilla.javascript.tools.shell.Main
exit 127
fi
if [ $1 = "-selenium" ]
then
java -jar funcunit/dist/selenium/selenium/selenium-server.jar
java -jar funcunit/java/selenium-server.jar
exit 127
fi
CP=funcunit/dist/selenium/selenium/selenium-java-client-driver.jar:steal/rhino/js.jar
CP=funcunit/java/selenium-java-client-driver.jar:steal/rhino/js.jar
if [ $1 = "-mail" ]
then
CP=steal/rhino/mail.jar:funcunit/dist/selenium/selenium/selenium-java-client-driver.jar:steal/rhino/js.jar
CP=steal/rhino/mail.jar:funcunit/java/selenium-java-client-driver.jar:steal/rhino/js.jar
shift
fi

Expand Down
16 changes: 9 additions & 7 deletions js.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,29 @@ if "%1"=="-?" GOTO PRINT_HELP
if "%1"=="--help" GOTO PRINT_HELP

if "%1"=="-d" (
java -classpath funcunit/dist/selenium/selenium/selenium-java-client-driver.jar;steal/rhino/js.jar org.mozilla.javascript.tools.debugger.Main
java -classpath funcunit/java/selenium-java-client-driver.jar;steal/rhino/js.jar org.mozilla.javascript.tools.debugger.Main
GOTO END
)
if "%1"=="-selenium" (
java -jar funcunit\java\selenium-server.jar
GOTO END
)
SET CP=funcunit/dist/selenium/selenium/selenium-java-client-driver.jar;steal\rhino\js.jar
SET CP=funcunit/java/selenium-java-client-driver.jar;steal\rhino\js.jar
if "%1"=="-mail" (
SET CP=steal/rhino/mail.jar;funcunit/dist/selenium/selenium/selenium-java-client-driver.jar;steal\rhino\js.jar
SET CP=steal/rhino/mail.jar;funcunit/java/selenium-java-client-driver.jar;steal\rhino\js.jar
SHIFT /0
)
SET ARGS=[
SET FILENAME=%1
SET FILENAME=%FILENAME:\=/%
::haven't seen any way to loop through all args yet, so for now this goes through arg 2-7
for /f "tokens=2,3,4,5,6,7 delims= " %%a in ("%*") do SET ARGS=!ARGS!'%%a','%%b','%%c','%%d','%%e','%%f'
::remove the commas
for %%a in (",''=") do ( call set ARGS=%%ARGS:%%~a%% )
::remove the empty args
:: for %%a in (",''=") do ( call set ARGS=%%ARGS:%%~a%% )
SET ARGS=%ARGS:,''=%
::remove the spaces
for /f "tokens=1*" %%A in ("%ARGS%") do SET ARGS=%%A
:: for /f "tokens=1*" %%A in ("%ARGS%") do SET ARGS=%%A
SET ARGS=%ARGS: =%
SET ARGS=%ARGS%]
set ARGS=%ARGS:\=/%
java -Xss1024k -cp %CP% org.mozilla.javascript.tools.shell.Main -opt -1 -e _args=%ARGS% -e load('%FILENAME%')
Expand All @@ -54,4 +56,4 @@ echo js steal/generate/controller [NAME] Generates a Controller file
echo js steal/generate/model [TYPE] [NAME] Generates a Model file
echo js apps/[NAME]/compress.js Compress your application and generate documentation

:END
:END

0 comments on commit 53fc5e2

Please sign in to comment.