diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/.scala_wrapper | 152 |
1 files changed, 0 insertions, 152 deletions
diff --git a/bin/.scala_wrapper b/bin/.scala_wrapper deleted file mode 100755 index 6564f8ff98..0000000000 --- a/bin/.scala_wrapper +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/sh -############################################################################## -# ____ ____ ____ ____ ______ # -# / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala # -# __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL # -# /_____/\____/\___/\____/____/ # -# # -############################################################################## - -############################################################################## -# launch script for scala tools -# -# @author Philippe Altherr -# @version 1.0 -# -# $Id$ - -############################################################################## -# define prefix and script - -SOURCE="$0"; -while [ -h "$SOURCE" ]; do - SCRIPT="`basename $SOURCE`"; - LOOKUP="`ls -ld "$SOURCE"`"; - TARGET="`expr "$LOOKUP" : '.*-> \(.*\)$'`"; - if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then - SOURCE="${TARGET:-.}"; - else - SOURCE="`dirname "$SOURCE"`/${TARGET:-.}"; - fi; -done; -PREFIX="`dirname "$SOURCE"`/.."; -PREFIX="`cd "$PREFIX"; pwd`"; - -############################################################################## -# compute product & version - -CVSTREE="false"; -PRODUCT="$SCRIPT" - -if [ -f "$PREFIX/VERSION" ]; then - VERSION=`head -1 "$PREFIX/VERSION"`; -elif [ -d "$PREFIX/CVS" ]; then - CVSTREE="true"; - VERSION="development version"; -else - VERSION="unknown version"; -fi - -############################################################################## -# check script name - -if [ -z "$SCRIPT" ]; then - exit 0; -fi; - -case "$SCRIPT" in - socos* | siris* | surus* | dtd2scala* ) - true;; - *) - echo "unknown script \`$SCRIPT'" 1>&2; - exit 1;; -esac; - -############################################################################## -# setup paths - -if [ "$CVSTREE" = "true" ]; then - BCEL_PATH="${BCEL_PATH:-/home/linuxsoft/apps/BCEL-5/bcel.jar}"; - FJBG_PATH="${FJBG_PATH:-/home/linuxsoft/apps/fjbg/jars/fjbg.jar}"; - MSIL_PATH="${MSIL_PATH:-/home/linuxsoft/apps/java2net/msil.jar}"; - XERCES_PATH="${XERCES_PATH:-/home/linuxsoft/apps/xerces/xercesImpl.jar}"; - SCALA_CLASSES="$PREFIX/classes"; - SCALA_SOURCES="$PREFIX/sources"; -else - PROJECT_NAME="scala"; - LIBDIR="$PREFIX/lib"; - DATADIR="$PREFIX/share"; - BCEL_PATH="$LIBDIR/bcel.jar"; - FJBG_PATH="$LIBDIR/fjbg.jar"; - MSIL_PATH="$LIBDIR/msil.jar"; - XERCES_PATH="$LIBDIR/xercesImpl.jar"; - SCALA_CLASSES="$LIBDIR/$PROJECT_NAME.jar"; - SCALA_SOURCES="$DATADIR/$PROJECT_NAME/library"; -fi; - -JAVA_CLASSPATH="$SCALA_CLASSES"; -JAVA_CLASSPATH="$JAVA_CLASSPATH:$BCEL_PATH"; -JAVA_CLASSPATH="$JAVA_CLASSPATH:$FJBG_PATH"; -JAVA_CLASSPATH="$JAVA_CLASSPATH:$MSIL_PATH"; -JAVA_CLASSPATH="$JAVA_CLASSPATH:$XERCES_PATH"; - -SCALA_CLASSPATH="${CLASSPATH:-.}" - -SCALA_BOOTCLASSPATH="$JAVA_CLASSPATH"; -SCALA_BOOTCLASSPATH="$SCALA_BOOTCLASSPATH:$SCALA_SOURCES"; - -############################################################################## -# OS specific support - -case `uname` in - CYGWIN* ) - # For Cygwin, switch paths to Windows format before running java. - # We assume that CLASSPATH is already in Windows format, so there - # is nothing to do for SCALA_CLASSPATH. - JAVA_CLASSPATH=`cygpath -w -p "$JAVA_CLASSPATH"` - SCALA_BOOTCLASSPATH=`cygpath -w -p "$SCALA_BOOTCLASSPATH"` - ;; -esac - -############################################################################## -# select java arguments - -JAVA_ARGS="-Dscala.boot.class.path='$SCALA_BOOTCLASSPATH'"; -JAVA_ARGS="$JAVA_ARGS -Dscala.class.path='$SCALA_CLASSPATH'"; -JAVA_ARGS="$JAVA_ARGS -Dscala.product='$PRODUCT'"; -JAVA_ARGS="$JAVA_ARGS -Dscala.version='$VERSION'"; -JAVA_ARGS="$JAVA_ARGS -classpath '$JAVA_CLASSPATH'"; -JAVA_ARGS="$JAVA_ARGS -ms16m -enableassertions"; - -case "$SCRIPT" in - *-debug* ) - JAVA_ARGS="$JAVA_ARGS -Djava.compiler=NONE";; -esac; - -############################################################################## -# select main class & program arguments - -# select script-specific program arguments -case "$SCRIPT" in - socos* ) - JAVA_MAIN="scalac.Main"; - ;; - surus* ) - JAVA_MAIN="scalai.Main"; - ;; - siris* ) - SCALA_WRAPPER_EXEC=${SCALA_WRAPPER_EXEC:="exec ledit"}; - JAVA_MAIN="scalai.Main"; - MAIN_ARGS="$MAIN_ARGS -interactive"; - ;; - dtd2scala* ) - JAVA_MAIN="dtd2scala.Main"; - ;; -esac; - -############################################################################## -# invoke java - -eval ${SCALA_WRAPPER_EXEC:-exec} java $JAVA_ARGS $JAVA_MAIN $MAIN_ARGS '"$@"'; - -############################################################################## |