From c35016a27cd68870a8728ea1829c17fc55304aa9 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 14 Jun 2018 18:39:37 -0500 Subject: [PATCH] make Mac OSX's sed happy --- contrib/utilities/indent_common.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/utilities/indent_common.sh b/contrib/utilities/indent_common.sh index 802b8283ac..ddb1a231e9 100644 --- a/contrib/utilities/indent_common.sh +++ b/contrib/utilities/indent_common.sh @@ -99,7 +99,8 @@ format_inst() tmpfile="$(mktemp "${TMPDIR}/$(basename "$1").tmp.XXXXXXXX")" cp "${file}" "${tmpfile}" - sed -i -e 's#\\{#{ // namespace#g' -e 's#\\}#} // namespace#g' "${tmpfile}" + sed -i -e 's#\\{#{ // namespace#g' "${tmpfile}" + sed -i -e 's#\\}#} // namespace#g' "${tmpfile}" # # Yes, we have to call clang-format in this weird way to ensure that it @@ -108,8 +109,8 @@ format_inst() # clang-format < "${tmpfile}" > "${tmpfile}new" - sed -i -e 's#{ // namespace#\\{#g' -e 's#}[ ]*// namespace.*#\\}#g' \ - "${tmpfile}new" + sed -i -e 's#{ // namespace#\\{#g' "${tmpfile}new" + sed -i -e 's#}[ ]*// namespace.*#\\}#g' "${tmpfile}new" diff -q "${file}" "${tmpfile}new" >/dev/null || mv "${tmpfile}new" "${file}" rm -f "${tmpfile}" "${tmpfile}new" -- 2.39.5