From a9ec38808f93fdc64b7dcd4053cd131b7b9c919c Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Fri, 22 Jul 2016 15:35:20 -0400 Subject: [PATCH] Fix sed issue on non gnu sed computers by using perl --- autoformat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoformat.sh b/autoformat.sh index 5b4bf14..a921ae5 100755 --- a/autoformat.sh +++ b/autoformat.sh @@ -19,5 +19,5 @@ 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 +perl -ni'' -e '/^\s*$/ || print' $GLOB \cd ->/dev/null