Before Hello, wold section to sbt guild, you will need to install sbt in Linux first. (Actually what ever platform, but the script below need to run under Unix shell)
First create a script, name it: install.sh
#!/bin/bash
log() {
echo "$1" | sed "s~^.*$~[$(date +"%Y-%m-%d %H:%M:%S.%3N")]($$) &~g"
}
run() {
cmd="$@"
log ">>> $cmd"
eval "$cmd"
return $?
}
{
log "new dir ~/bin"
mkdir -p ~/bin
} && {
log "download ~/bin/sbt-launch.jar"
RSS="https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.6/sbt-launch.jar?_ga=1.44477223.2046345484.1415150436"
run wget $RSS -O $HOME/bin/sbt-launch.jar
} && {
log "create ~/bin/sbt"
read -d '' BIN_CONTENT <<"EOF"
SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@"
EOF
echo $BIN_CONTENT >~/bin/sbt && chmod a+x ~/bin/sbt
} || {
log "Error: some step failed as above."
exit 1
}
And run bash install.sh will help to install sbt to ~/bin folder.