Created
September 3, 2012 22:43
-
-
Save brianium/3614278 to your computer and use it in GitHub Desktop.
bash script for making a new sbt project
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/bash | |
mkdir -p src/main/{resources,scala} | |
mkdir -p "src/test/"{resources,scala} | |
mkdir -p src/it/{resources,scala} | |
mkdir project | |
#create project files | |
echo "sbt.version=0.11.3" > project/build.properties | |
echo -e 'resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"\n' > project/plugins.sbt | |
echo 'addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0-SNAPSHOT")' >> project/plugins.sbt | |
touch project/Build.scala | |
#Build.scala | |
BUILD="project/Build.scala" | |
echo "import sbt._" > $BUILD | |
echo -e "import Keys._\n" >> $BUILD | |
echo "object A extends Build {" >> $BUILD | |
echo " lazy val root =" >> $BUILD | |
echo ' Project("replace_me", file("."))' >> $BUILD | |
echo " .configs(IntegrationTest)" >> $BUILD | |
echo " .settings(Defaults.itSettings : _*)" >> $BUILD | |
echo -e " .settings(libraryDependencies += scalatest)\n" >> $BUILD | |
echo ' lazy val scalatest = "org.scalatest" %% "scalatest" % "1.8" % "it,test"' >> $BUILD | |
echo '}' >> $BUILD | |
#build.sbt | |
touch build.sbt | |
echo -e 'name := "Replace Me"\n' > build.sbt | |
echo -e 'version := "0.0.1"\n' >> build.sbt | |
echo -e 'scalaVersion := "2.9.2"\n' >> build.sbt | |
echo "libraryDependencies ++= Seq(" >> build.sbt | |
echo ")" >> build.sbt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment