From: <nr...@us...> - 2008-12-03 09:39:49
|
Revision: 5681 http://jython.svn.sourceforge.net/jython/?rev=5681&view=rev Author: nriley Date: 2008-12-03 09:39:46 +0000 (Wed, 03 Dec 2008) Log Message: ----------- --print option for start script Modified Paths: -------------- trunk/jython/src/shell/jython Modified: trunk/jython/src/shell/jython =================================================================== --- trunk/jython/src/shell/jython 2008-12-03 09:30:15 UTC (rev 5680) +++ trunk/jython/src/shell/jython 2008-12-03 09:39:46 UTC (rev 5681) @@ -125,6 +125,10 @@ -D*) python_args=("${python_args[@]}" "$1") ;; + # Print the command, don't execute it + --print) + print_requested=true + ;; # Run with the instrumented profiler: http://jiprof.sourceforge.net/ --profile) rm -f profile.txt # XXX do this? @@ -197,12 +201,17 @@ [ -n "$profile_requested" ] && echo "Running with instrumented profiler" java_args=("${java_args[@]}" -classpath "$CP$CP_DELIMITER$CLASSPATH") else - if [ -z "$help_requested" ] ; then + if [ -z "$help_requested" -a -z "$print_requested" ] ; then JAVA_CMD=(exec "${JAVA_CMD[@]}") fi - java_args=("${java_args[@]}" -Xbootclasspath/a:"$CP" -classpath "$CLASSPATH") + java_args=("${java_args[@]}" -Xbootclasspath/a:"$CP") + [ -n "$CLASSPATH" ] && java_args=("${java_args[@]}" -classpath "$CLASSPATH") fi +if [ -n "$print_requested" ] ; then + JAVA_CMD=(echo $JAVA_CMD) +fi + "${JAVA_CMD[@]}" $JAVA_OPTS "${java_args[@]}" -Dpython.home="$JYTHON_HOME" \ -Dpython.executable="$PRG" org.python.util.jython $JYTHON_OPTS "$@" @@ -213,6 +222,7 @@ echo "Jython launcher options:" >&2 echo "-Jarg : pass argument through to Java VM (e.g. -J-Xmx512m)" >&2 echo "--jdb : run under JDB" >&2 + echo "--print : print the Java command instead of executing it" >&2 echo "--profile: run with the Java Interactive Profiler (http://jiprof.sf.net)" >&2 echo "--verify : enable bytecode verifier for Jython classes (for development)" >&2 echo "-- : pass remaining arguments through to Jython" >&2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |