summaryrefslogtreecommitdiff
path: root/src/mono/bin/scala.net
diff options
context:
space:
mode:
Diffstat (limited to 'src/mono/bin/scala.net')
-rwxr-xr-xsrc/mono/bin/scala.net60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/mono/bin/scala.net b/src/mono/bin/scala.net
new file mode 100755
index 0000000000..a654f0071a
--- /dev/null
+++ b/src/mono/bin/scala.net
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+##############################################################################
+# @NAME@ @VERSION@
+##############################################################################
+# @COPYRIGHT@
+#
+# This is free software; see the distribution for copying conditions.
+# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+##############################################################################
+
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true ;;
+esac
+
+# Finding the root folder for this Scala distribution
+SOURCE=$0;
+SCRIPT=`basename "$SOURCE"`;
+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;
+SCALA_HOME=`dirname "$SOURCE"`/..;
+SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
+if $cygwin; then
+ SCALA_HOME=`cygpath --windows --short-name "$SCALA_HOME"`
+ SCALA_HOME=`cygpath --unix "$SCALA_HOME"`
+fi
+
+if [ ! -x "$MONO" ] ; then
+ if [ -d "$MONO_HOME" ] ; then
+ MONO="$MONO_HOME/bin/mono"
+ else
+ MONO="mono"
+ fi
+fi
+
+MSIL_LIBPATH="$SCALA_HOME/lib"
+[ -z "$MONO_PATH" ] || MSIL_LIBPATH="$MSIL_LIBPATH:$MONO_PATH"
+
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ MSIL_LIBPATH=`cygpath --path --$format "$MSIL_LIBPATH"`
+fi
+
+env MONO_PATH="$MSIL_LIBPATH" $MONO "$@"