blob: 769ab997b0e9902e518144ab90e3cf5fbdd1079d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#!/bin/bash
##############################################################################
# Copyright (C) 2002-2005 LAMP/EPFL
#
# 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
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;
PREFIX=`dirname "$SOURCE"`/..;
prefix=$PREFIX;
PREFIX=`cd "$PREFIX"; pwd`;
_JAVACMD=java
_CPATH=@CPATH@
# For Cygwin, switch paths to appropriate format before running java
if $cygwin; then
if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
format=mixed
else
format=windows
fi
_CPATH=`cygpath --path --$format "$_CPATH"`
fi
main=
case "$SCRIPT" in
scalac* ) main=scala.tools.nsc.Main;;
scaladoc* ) main=scala.tools.scaladoc.Main;;
* ) abort "Don't know what to do for $SCRIPT.";;
esac;
$_JAVACMD \
-Dscala.product="$SCRIPT" \
-Dscala.version="@VERSION@" \
-Dscala.home="$PREFIX" \
-cp "$_CPATH" \
$main "$@"
|