2018-01-16 18:10:12 +00:00
|
|
|
#!/usr/bin/env bash
|
2017-10-10 17:45:39 +00:00
|
|
|
|
2017-11-13 15:36:16 +00:00
|
|
|
if [ "X$1" == "Xall" ]; then
|
|
|
|
for f in $(find ./src -name \*.java); do
|
|
|
|
echo Formatting $f
|
|
|
|
java -jar ./lib/google-java-format-1.3-all-deps.jar --replace $f
|
|
|
|
done
|
|
|
|
else
|
|
|
|
for file in $(git status --short | awk '{print $2}'); do
|
|
|
|
echo $file
|
|
|
|
java -jar ./lib/google-java-format-1.3-all-deps.jar --replace $file
|
|
|
|
done
|
|
|
|
fi
|
2017-10-10 17:45:39 +00:00
|
|
|
|