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=inline;hp=-c 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 --- 88e501ba541662e433a84807a35bb99d356456b1 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