Skip to content

Instantly share code, notes, and snippets.

@yyuu
Created February 2, 2012 10:06
Show Gist options
  • Select an option

  • Save yyuu/1722714 to your computer and use it in GitHub Desktop.

Select an option

Save yyuu/1722714 to your computer and use it in GitHub Desktop.
switching between sbt versions (sbt @${VERSION} ${SBT_OPTIONS})
#!/bin/sh -e
SBT_HOME="$HOME/usr/sbt"
if test $# -gt 0 -a -f "$SBT_HOME/${1#@}/sbt-launch.jar"; then
SBT_JAR="$SBT_HOME/${1#@}/sbt-launch.jar"
shift
fi
if ! test -f "$SBT_JAR"; then
SBT_JAR="$SBT_HOME/sbt-launch.jar"
fi
exec java -Xmx512M -jar "$SBT_JAR" "$@"
# vim:set ft=sh :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment