]> https://gitweb.dealii.org/ - dealii.git/commitdiff
make Mac OSX's sed happy 6762/head
authorMatthias Maier <tamiko@43-1.org>
Thu, 14 Jun 2018 23:39:37 +0000 (18:39 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 14 Jun 2018 23:39:37 +0000 (18:39 -0500)
contrib/utilities/indent_common.sh

index 802b8283ac47e62cd04b41073549e490a4b0cd64..ddb1a231e964b5432cb2c258caa08e095f440cf9 100644 (file)
@@ -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"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.