contrib/format.sh: Fix bashisms.
authorFlorian Forster <octo@collectd.org>
Sun, 29 Oct 2017 09:24:02 +0000 (10:24 +0100)
committerFlorian Forster <octo@collectd.org>
Sun, 29 Oct 2017 09:24:02 +0000 (10:24 +0100)
contrib/format.sh

index d4444cc..ea1ed01 100755 (executable)
@@ -10,8 +10,8 @@ if test $# -lt 1; then
 fi
 
 for i in "$@"; do
-  d="$(dirname "${i}")"
-  o="$(tempfile -d "${d}" -m 0644)"
+  d="`dirname "${i}"`"
+  o="`TMPDIR="${d}" mktemp format.XXXXXX`"
 
   curl --silent --data-binary "@-" https://clang-format.appspot.com/ <"${i}" >"${o}"
   if test $? -eq 0; then