From: Richard Hartmann Date: Mon, 9 Sep 2013 23:34:42 +0000 (+0200) Subject: vcsh: Support *BSD/OSX mktemp X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/88e501ba541662e433a84807a35bb99d356456b1?ds=sidebyside;hp=09f129a260f5347219b8ac84c6f2204fa2b0d9a6 vcsh: Support *BSD/OSX mktemp mktemp on *BSD/OSX expects a template whereas GNU mktemp does not. Pass a template to mktemp to make *BSD/OSX happy. github: fixes richih/vcsh#83 --- diff --git a/vcsh b/vcsh index 508c087..bf843dd 100755 --- a/vcsh +++ b/vcsh @@ -365,7 +365,7 @@ write_gitignore() { file="$new" done; done | sort -u) - tempfile=$(mktemp) || fatal "could not create tempfile" 51 + tempfile=$(mktemp tmp.XXXXXXXXXX) || fatal "could not create tempfile" 51 echo '*' > "$tempfile" || fatal "could not write to '$tempfile'" 57 for gitignore in $gitignores; do echo "$gitignore" | sed 's@^@!/@' >> "$tempfile" || fatal "could not write to '$tempfile'" 57