Skip to content
Snippets Groups Projects
Commit 2650689d authored by Richard Hartmann's avatar Richard Hartmann
Browse files

Merge branch 'fix--mktemp_on_OSX'

parents 09f129a2 ecb36d5d
No related branches found
No related tags found
No related merge requests found
...@@ -365,7 +365,11 @@ write_gitignore() { ...@@ -365,7 +365,11 @@ write_gitignore() {
file="$new" file="$new"
done; done;
done | sort -u) done | sort -u)
tempfile=$(mktemp) || fatal "could not create tempfile" 51
# 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 echo '*' > "$tempfile" || fatal "could not write to '$tempfile'" 57
for gitignore in $gitignores; do for gitignore in $gitignores; do
echo "$gitignore" | sed 's@^@!/@' >> "$tempfile" || fatal "could not write to '$tempfile'" 57 echo "$gitignore" | sed 's@^@!/@' >> "$tempfile" || fatal "could not write to '$tempfile'" 57
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment