X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/88e501ba541662e433a84807a35bb99d356456b1..2650689d28f662e147d0be4c3ee248f873dbcc3c:/vcsh diff --git a/vcsh b/vcsh index bf843dd..d6ee234 100755 --- a/vcsh +++ b/vcsh @@ -365,7 +365,11 @@ write_gitignore() { file="$new" done; done | sort -u) + + # Contrary to GNU mktemp, mktemp on BSD/OSX requires a template for temp files + # Use the template GNU mktemo defaults to 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