Skip to content

Instantly share code, notes, and snippets.

@trygvis
Created December 1, 2011 14:37
Show Gist options
  • Save trygvis/1417195 to your computer and use it in GitHub Desktop.
Save trygvis/1417195 to your computer and use it in GitHub Desktop.
My SBT wrapper scripts
#!/bin/sh
if [ -z "$SBT_VERSION" ]
then
SBT_VERSION=0.7.7
fi
JAR=$HOME/.sbt/sbt-launch-$SBT_VERSION.jar
mkdir -p $HOME/.sbt
mkdir -p $HOME/.sbt/boot
if [ ! -r $JAR ]
then
URL="http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/$SBT_VERSION/sbt-launch.jar"
echo "Downloading sbt $SBT_VERSION from $URL"
wget -q -O "$JAR" $URL
if [ ! -r $JAR ]
then
echo "Unable to download file."
fi
fi
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
exec $JAVA_HOME/bin/java \
$JVM_ARGS \
-d64 \
-noverify \
-Dfile.encoding=UTF8 \
-Dsbt.boot.directory=$HOME/.sbt/boot \
-Xmx1024M -Xss1M -XX:MaxPermSize=256m \
-XX:+CMSClassUnloadingEnabled \
-jar $JAR "$@"
cat bin/sbt-0.11.0
#!/bin/sh
SBT_VERSION=0.11.0
export SBT_VERSION
exec `dirname $0`/sbt
#!/bin/sh
SBT_VERSION=0.11.0
export SBT_VERSION
. `dirname $0`/jrebel-version
JREBEL_JAR="$HOME/opt/jrebel/jrebel-$JREBEL_VERSION/jrebel.jar"
export JVM_ARGS="-javaagent:$JREBEL_JAR $JVM_ARGS"
exec `dirname $0`/sbt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment