From: Matthias Maier Date: Thu, 14 Jun 2018 23:39:37 +0000 (-0500) Subject: make Mac OSX's sed happy X-Git-Tag: v9.1.0-rc1~1038^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6762%2Fhead;p=dealii.git make Mac OSX's sed happy --- 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"