summaryrefslogtreecommitdiff
path: root/src/exec/scala-tool.unix.tmpl
blob: 71f10fa2614be90eff3997c71e02af5b488d51f1 (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
#!/bin/bash

##############################################################################
# Copyright @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

PREFIX=`dirname "$0"`/..;
PREFIX=`cd "$PREFIX"; pwd`;

JAVA=java
JAVA_CLASSPATH=@fjbg.jar@:@msil.jar@:@comp.path@:@lib.path@
TOOL=@tool.class@
TOOL_CLASSPATH=@lib.path@

# 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
    JAVA_CLASSPATH=`cygpath --path --$format "$JAVA_CLASSPATH"`
    TOOL_CLASSPATH=`cygpath --path --$format "$TOOL_CLASSPATH"`
fi

$JAVA \
  -Xms16M -Xmx256M \
  -Dscala.version="20051219-1541" \
  -Dscala.home="$PREFIX" \
  -cp "$JAVA_CLASSPATH" \
  "$TOOL" -sourcepath "$TOOL_CLASSPATH" "$@"