Skip to content

Instantly share code, notes, and snippets.

@tototoshi
Created July 1, 2016 15:03
Show Gist options
  • Save tototoshi/3187b2097fb55c718895651928a61ccd to your computer and use it in GitHub Desktop.
Save tototoshi/3187b2097fb55c718895651928a61ccd to your computer and use it in GitHub Desktop.
scalariform.sh
#!/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