Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 68 lines (57 sloc) 1.797 kb
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 60 61 62 63 64 65 66 67
#!/bin/bash

if [[ `uname -s` == *CYGWIN* ]] ; then
CURR_DIR="$( cd "$( dirname "$0" )" && pwd )"
  export JAVA_HOME=`cygpath -up "\Java\jdk1.6.0_31"`
else
CURR_DIR=`dirname $0`
  if [ `uname -s` = Linux ] ; then
export JAVA_HOME=/usr/lib/jvm/java-6-sun
  else
if [ `uname -s` = Darwin ] ; then
export JAVA_HOME=`/usr/libexec/java_home -F -v1.6+`
    else
export JAVA_HOME=/usr
    fi
fi
fi

export PATH=$JAVA_HOME/bin:$PATH
JAVA=$JAVA_HOME/bin/java

# Most of these settings are fine for everyone
XSS=-Xss2m
XMX=-Xmx1536m
XX=-XX:MaxPermSize=256m
ENCODING=-Dfile.encoding=UTF-8
HEADLESS=-Djava.awt.headless=true
USE_QUARTZ=-Dapple.awt.graphics.UseQuartz=false
DISABLE_EXT_DIRS=-Djava.ext.dirs=
BOOT=xsbt.boot.Boot

# Windows/Cygwin users need these settings
if [[ `uname -s` == *CYGWIN* ]] ; then

  # While you might want the max heap size lower, you'll run out
  # of heap space from running the tests if you don't crank it up
  # (namely, from TestChecksums)
  XMX=-Xmx1350m
  SBT_LAUNCH=`cygpath -w $SBT_LAUNCH`

  # This gets SBT working properly in my heavily-modded version of Cygwin --JAB (2/7/2012)
  if [ "$TERM" = "xterm" ] ; then
TERMINAL=-Djline.terminal=jline.UnixTerminal
  fi

fi

SBT_LAUNCH=$HOME/.sbt/sbt-launch-0.12.1.jar
URL='http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.12.1/sbt-launch.jar'

if [ ! -f $SBT_LAUNCH ] ; then
echo "downloading" $URL
  mkdir -p $HOME/.sbt
  curl -s -S -f $URL -o $SBT_LAUNCH || exit
fi

# UseQuartz=false so that we get pixel for pixel identical drawings between OS's, so TestChecksums works - ST 6/9/10
"$JAVA" \
    $XSS $XMX $XX \
    $ENCODING \
    $JAVA_OPTS \
    $HEADLESS \
    $TERMINAL \
    $USE_QUARTZ \
    $DISABLE_EXT_DIRS \
    -classpath $SBT_LAUNCH \
    $BOOT "$@"
Something went wrong with that request. Please try again.