From 285e48e92f5b85a1793254feb3c41fe46b163238 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Wed, 20 Jul 2016 15:32:00 -0400 Subject: [PATCH] Delete newlines when autoformatting --- autoformat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoformat.sh b/autoformat.sh index ba4d92d..5b4bf14 100755 --- a/autoformat.sh +++ b/autoformat.sh @@ -18,4 +18,6 @@ OPTS=( --mode=java -xc --style=google -j -s2 -xG -S -K -N -xn -xl -n -p -H ) GLOB=( src/**/*.java ) astyle $OPTS $GLOB|\grep -P '^(?!Unchanged)' +# Get rid of newlines +sed -i'' '/^\s*$/d' $GLOB \cd ->/dev/null