Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 41 lines (35 sloc) 1.04 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
#!/bin/sh

dir=$(dirname $0)
cd "$dir"

url="http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.12.0/sbt-launch.jar"

sbt="sbt-launch-0.12.0.jar"

# set the right tool to download sbt
if [ -n "$tool" ]; then
    echo -n
elif [ -n "$(which wget)" ]; then
    tool="wget"
elif [ -n "$(which curl)" ]; then
    tool="curl"
else
    echo "Couldn't find a tool to download sbt. Please do the following"
    echo "* download $url"
    echo "* set the name of the file to $sbt"
    echo "* relaunch ./sbt"
    exit 1
fi

# download the sbt launcher if it's not already here
if [ ! -f "$sbt" ]; then
    case "$tool" in
        "wget"*)
            wget "$url" -O "./$sbt"
            ;;
        "curl"*)
            curl "$url" -o "./$sbt"
            ;;
        *)
            echo "don't know this tool: $tool"
            exit 2
    esac
fi

# tweak this line according to your needs
java $SBT_PROPS -Xmx512M -jar -Dfile.encoding=UTF8 -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m "$dir/$sbt" "$@"
Something went wrong with that request. Please try again.