Created
July 1, 2016 15:03
-
-
Save tototoshi/3187b2097fb55c718895651928a61ccd to your computer and use it in GitHub Desktop.
scalariform.sh
This file contains 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 | |
dir=${1:?directory is not specified} | |
subproject=$2 | |
cd $dir | |
tmpfile=$(mktemp "project/$$.sbt") | |
clean() { | |
rm -f $tmpfile | |
} | |
trap clean EXIT | |
echo 'addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")' > $tmpfile | |
if [ "$subproject" == "" ]; then | |
sbt scalariformFormat | |
else | |
sbt $subproject/scalariformFormat | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment