Skip to content

Instantly share code, notes, and snippets.

@rparree
Forked from maciej/init-scala.sh
Last active December 28, 2015 21:09
Show Gist options
  • Save rparree/7562785 to your computer and use it in GitHub Desktop.
Save rparree/7562785 to your computer and use it in GitHub Desktop.
#!/bin/bash
# https://gist.github.com/rparree/7562785
PROJECT_NAME="$1"
SCALA_VERSION="2.10.2"
mkdir $PROJECT_NAME
cd $PROJECT_NAME
cat > build.sbt << EOF
name := "$PROJECT_NAME"
version := "1.0"
scalaVersion := "$SCALA_VERSION"
EOF
mkdir -p "src/main/scala"
mkdir -p "src/main/resources"
mkdir -p "src/test/scala"
mkdir -p "src/test/resources"
cat > .gitignore << EOF
target/
.DS_Store
.idea
.idea_modules
*.iml
*.ipr
*.iws
EOF
git init
git add .gitignore
git add build.sbt
git commit -m 'Initial commit'
pwd | xclip -selection c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment