Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 47 lines (35 sloc) 1009 Bytes
#!/bin/bash
if [ -f "~/.sbtconfig" ]; then
. ~/.sbtconfig
fi
# SBT configuration
export SBT_BOOT_DIR=${HOME}/.sbt/boot/
if [ ! -d "${SBT_BOOT_DIR}" ]; then
mkdir -p ${SBT_BOOT_DIR}
fi
# Build configuration
BUILD_PARAMS=""
if [ -n "$BUILD_NUMBER" ]; then
BUILD_PARAMS="${BUILD_PARAMS} -Dbuild.number=\"$BUILD_NUMBER\""
fi
if [ -n "$BUILD_VCS_NUMBER" ]; then
BUILD_PARAMS="${BUILD_PARAMS} -Dbuild.vcs.number=\"$BUILD_VCS_NUMBER\""
fi
# Ivy configuration
IVY_PARAMS=""
for arg in "$@"
do
if [ "$arg" == "--directory-ivy-cache" ]; then
echo "setting ivy cache dir"
IVY_PARAMS="-Dsbt.ivy.home=.ivy -Divy.home=.ivy"
shift
fi
done
#MaxPermSize specifies the the maximum size for the permanent generation heap,
# a heap that holds objects such as classes and methods. Xmx is the heap size.
java -Xmx2048M -XX:MaxPermSize=1024m \
-Dsbt.boot.directory=$SBT_BOOT_DIR \
$BUILD_PARAMS \
$IVY_PARAMS \
$SBT_EXTRA_PARAMS \
-jar `dirname $0`/dev/sbt-launch-0.11.3.jar "$@"