Last active
August 29, 2015 14:23
-
-
Save timvw/385cce40cfaac7bbe54a to your computer and use it in GitHub Desktop.
Create an sbt project for scala and spark
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 | |
| # usage: emptyspark.sh blah | |
| # Result: project is created at /Users/timvw/src/blah | |
| # Inspired by: https://gist.github.com/alvinj/3194379 | |
| project=$1 | |
| basedir="/Users/timvw/src" | |
| targetdir="$basedir/$1" | |
| scalaversion="2.11.6" | |
| sparkversion="1.4.0" | |
| mkdir -p $targetdir/src/{main,test}/{java,resources,scala} | |
| mkdir $targetdir/lib | |
| mkdir $targetdir/project | |
| mkdir $targetdir/target | |
| echo "name := \"$project\" | |
| version := \"1.0\" | |
| scalaVersion := \"$scalaversion\" | |
| libraryDependencies += \"org.apache.spark\" %% \"spark-core\" % \"$sparkversion\" | |
| " > $targetdir/build.sbt | |
| echo "bin/ | |
| project/ | |
| target/ | |
| .cache | |
| .classpath | |
| .project | |
| .settings" > $targetdir/.gitignore | |
| touch $targetdir/README.md | |
| echo "" | |
| echo "Project created at $targetdir" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment