Skip to content

Instantly share code, notes, and snippets.

@antlypls
Last active May 22, 2018 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save antlypls/ac2917c6c4451ecc2980 to your computer and use it in GitHub Desktop.
Save antlypls/ac2917c6c4451ecc2980 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ -z "$1" ] ; then
echo 'Project name is empty'
exit 1
fi
PROJECT_NAME="$1"
SCALA_VERSION="${2-2.11.8}"
SCALATEST_VERSION="${3-2.2.6}"
mkdir $PROJECT_NAME
cd $PROJECT_NAME
cat > build.sbt << EOF
name := "$PROJECT_NAME"
scalaVersion := "$SCALA_VERSION"
libraryDependencies += "org.scalatest" %% "scalatest" % "$SCALATEST_VERSION" % "test"
EOF
mkdir -p src/{main/{scala,resources},test/{scala,resources}}
cat > .gitignore << EOF
target/
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment