From b235565eefccc67ad2b61117a75cbe1b93a27cbb Mon Sep 17 00:00:00 2001 From: jianglai Date: Wed, 12 Jul 2017 07:11:52 -0700 Subject: [PATCH] Fix the build on MacOS The build on MacOS fails (https://github.com/google/nomulus/issues/67) due to different syntax for sed on BSD vs. Linux. See this StackOverflow discussion: https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux Also adds a newline between @SuppressWarnings annotation and the class definition. Note that MacOS support is best-effort only. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=161661181 --- java/google/registry/xjc/BUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/google/registry/xjc/BUILD b/java/google/registry/xjc/BUILD index 6f1b89cb6..ccba64454 100644 --- a/java/google/registry/xjc/BUILD +++ b/java/google/registry/xjc/BUILD @@ -44,9 +44,9 @@ genrule( "cp $(SRCS) $$TMP", "cd $$TMP", "$$XJC -npa -quiet -extension -d $$OUT -b *.xjb *.xsd", - ("find $$OUT -name '*.java' | xargs sed -i 's/" + + ("find $$OUT -name '*.java' | xargs sed -i.bak 's/" + "public class/" + - "@SuppressWarnings({\"unchecked\",\"serial\",\"cast\"}) " + + "@SuppressWarnings({\"unchecked\",\"serial\",\"cast\"})\\\n" + "public class/'"), "cd $$REP", "rm -rf $$TMP",