[Nice-commit] Nice/bin nicec,1.33,1.34
Brought to you by:
bonniot
From: <bo...@us...> - 2003-04-21 18:39:51
|
Update of /cvsroot/nice/Nice/bin In directory sc8-pr-cvs1:/tmp/cvs-serv22757/bin Modified Files: nicec Log Message: Removed the old 'nicer' script. A simple jvm is enough to run Nice programs. Cleaned up. The "java_g" command is platform dependant, and probably deprecated (it tracks back to turbocow@cma!). Index: nicec =================================================================== RCS file: /cvsroot/nice/Nice/bin/nicec,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** nicec 19 Apr 2003 13:48:10 -0000 1.33 --- nicec 21 Apr 2003 18:39:46 -0000 1.34 *************** *** 3,41 **** ### The Nice compiler ### ! ### Copyright 2000 Daniel Bonniot ! ! JAVA=${JAVA-java} ! ! usage_nicer() ! { ! echo "usage: nicer path/to/file.jar" ! exit 1 ! } ! ! ## Parsing command line arguments ! ! read_java_arg() ! { ! if [ "x$1" = "x-g" ]; then ! JAVA="java_g -Djava.compiler=NONE" ! else ! JAVA="${JAVA} $1" ! fi ! } ! ! ## Testing if nice is properly installed ! test_installation() ! { ! if [ ! -r ${NICE} ]; then ! echo "Nice was not found in ${NICE}" ! echo "Please move the nice.jar file there" ! echo "or set the NICE environment variable to the location of the nice.jar file" ! exit 1 ! fi ! } ! ## Locating nice home find_home() --- 3,13 ---- ### The Nice compiler ### ! ### Copyright 2003 Daniel Bonniot ! ### The Java Virtual Machine can be specified in the JAVA environment variable. ! ### Arguments prefixed by -J will be passed to the JVM. ! ## Locating Nice home find_home() *************** *** 61,74 **** } ! ## Main part scriptName="$0" - progname=`basename $0` experimental=false while true; do case "x$1" in ! x-J*) read_java_arg "`expr substr "$1" 3 1000`";; ! x-e) experimental=true ;; *) break;; esac --- 33,48 ---- } ! ## Parsing special command line arguments + java=${JAVA-java} scriptName="$0" experimental=false while true; do case "x$1" in ! x-J*) ! java="${java} `expr substr \"$1\" 3 1000`";; ! x-e) ! experimental=true ;; *) break;; esac *************** *** 81,131 **** fi ! case $progname in ! nicec) ! # Having a trailing ":" at the end of CLASSPATH seems to act as ":." on some platforms. ! # We don't want that by default (if CLASSPATH is empty). ! if [ -z "${CLASSPATH}" ]; then ! CLASSPATH=${NICEC_JAR} ! else ! CLASSPATH=${NICEC_JAR}:${CLASSPATH} ! fi ! if [ $experimental = true ]; then ! CLASSPATH=${APPHOME}/classes:${APPHOME}/classes.old:${CLASSPATH} ! fi ! export CLASSPATH ! system_args="--runtime=${NICEC_JAR}" ! gcj="`which gcj 2>/dev/null`" ! # Check the string found is really a file ! # This is a work-around for a bug in OS X: ! # which gcj returns 0 (success) and prints "no gcj in $PATH" ! if [ -f "$gcj" ]; then ! system_args="${system_args} --native-compiler=${gcj}" ! fi ! exec ${JAVA} nice.tools.compiler.fun ${system_args} "$@" ! ;; ! nicer) ! jar=$1 ! if [ -z "$jar" ]; then ! usage_nicer ! elif [ ! -f "$jar" ]; then ! if [ -f "${jar}.jar" ]; then ! jar="${jar}.jar" ! else ! echo "$jar does not exist" ! usage_nicer ! fi ! fi ! shift ! CLASSPATH=$jar:${NICEC}:$CLASSPATH ! export CLASSPATH ! exec ${JAVA} nice.tools.runJar ${jar} "$@" ! ;; ! *) ! echo "unknow nice command: ${progname}" ! exit 1 ! ;; ! esac --- 55,81 ---- fi ! # Having a trailing ":" at the end of CLASSPATH seems to act as ":." on some platforms. ! # We don't want that by default (if CLASSPATH is empty). ! if [ -z "${CLASSPATH}" ]; then ! CLASSPATH=${NICEC_JAR} ! else ! CLASSPATH=${NICEC_JAR}:${CLASSPATH} ! fi ! if [ $experimental = true ]; then ! CLASSPATH=${APPHOME}/classes:${APPHOME}/classes.old:${CLASSPATH} ! fi ! export CLASSPATH ! system_args="--runtime=${NICEC_JAR}" ! gcj="`which gcj 2>/dev/null`" ! # Check the string found is really a file ! # This is a work-around for a bug in OS X: ! # which gcj returns 0 (success) and prints "no gcj in $PATH" ! if [ -f "$gcj" ]; then ! system_args="${system_args} --native-compiler=${gcj}" ! fi ! ! exec ${java} nice.tools.compiler.fun ${system_args} "$@" |