FIXes 'mktemp' to work again on Linux

Broken in 67241a46a8

`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
This commit is contained in:
go2null 2015-05-28 11:18:03 +00:00
parent aecef0eaed
commit c7635f8f21

View file

@ -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), \