Skip to content

Commit

Permalink
FIXes 'mktemp' to work again on Linux
Browse files Browse the repository at this point in the history
Broken in 67241a4

`mktemp` for BSD (including OSX) requires a template, but it allows any number
of `X`s in the template.

(GNU) `mktemp` for Linux does not require a template, however, if a template is
specified, then the number of `X`s must be 6.

See http://unix.stackexchange.com/a/206111/117157
  • Loading branch information
go2null committed May 28, 2015
1 parent aecef0e commit c7635f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install:
@mkdir -p $(DESTDIR)$(BINPREFIX)
@echo "... installing bins to $(DESTDIR)$(BINPREFIX)"
@echo "... installing man pages to $(DESTDIR)$(MANPREFIX)"
$(eval TEMPFILE := $(shell mktemp -t git-extra.XXX))
$(eval TEMPFILE := $(shell mktemp -q -t git-extras.XXXXXX 2>/dev/null || mktemp -q))
@# chmod from rw-------(default) to rwxrwxr-x, so that users can exec the scripts
@chmod 775 $(TEMPFILE)
@$(foreach COMMAND, $(COMMANDS_USED_WITH_GIT_REPO), \
Expand Down

0 comments on commit c7635f8

Please sign in to comment.