Created
September 16, 2012 21:13
-
-
Save wbarksdale/3734422 to your computer and use it in GitHub Desktop.
A Simple shell script to set up a new sbt project with a provided name, a build.sbt file, a Build.scala file, and a main method, and the eclipse plugin. So all you need to do to get your project into eclipse is type "eclipse at the sbt prompt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
EXPECTED_ARGS=1 | |
E_BADARGS=65 | |
if [ $# -ne $EXPECTED_ARGS ] | |
then | |
echo "usage: `basename $0` {newProjectName}" | |
exit $E_BADARGS | |
fi | |
mkdir $1 | |
mkdir $1/src | |
mkdir $1/src/main | |
mkdir $1/src/main/resources | |
mkdir $1/src/main/scala | |
mkdir $1/src/main/java | |
mkdir $1/src/test | |
mkdir $1/src/test/resources | |
mkdir $1/src/test/scala | |
mkdir $1/src/test/java | |
mkdir $1/project | |
mkdir $1/lib | |
echo "target/" > $1/.gitignore | |
echo "name := \"$1\"\n\nversion := \"1.0\"\n\nscalaVersion := \"2.9.1\"" > $1/build.sbt | |
echo "addSbtPlugin(\"com.typesafe.sbteclipse\" % \"sbteclipse-plugin\" % \"2.1.0\")" > $1/project/plugins.sbt | |
echo "//Build.scala" > $1/project/Build.scala | |
echo "object Hello { def main(args: Array[String]) = println(\"Hello!\")}" > $1/src/main/scala/Hello.scala | |
cd $1/ | |
sbt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment