Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

js/js.bat:

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...
commit 53fc5e2fb28f280eafa6ffd27f7be725e7eb499f 1 parent 9c8c593
rloh authored
Showing with 13 additions and 11 deletions.
  1. +4 −4 js
  2. +9 −7 js.bat
View
8 js
@@ -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
View
16 js.bat
@@ -12,16 +12,16 @@ 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=[
@@ -29,10 +29,12 @@ 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%')
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.