From: Richard Hartmann Date: Tue, 10 Sep 2013 14:12:02 +0000 (+0200) Subject: vcsh: Add comments X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/ecb36d5d99bdcebd781c5cb17780f51020f896b7?ds=sidebyside;hp=--cc vcsh: Add comments --- ecb36d5d99bdcebd781c5cb17780f51020f896b7 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