From c7635f8f2130f9904bc0000ccc31fb236cdc01d2 Mon Sep 17 00:00:00 2001 From: go2null <1t1is2@gmail.com> Date: Thu, 28 May 2015 11:18:03 +0000 Subject: [PATCH] FIXes 'mktemp' to work again on Linux Broken in 67241a46a820f19706a398adfee55af863fb5449 `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 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f52064d59..67ee42999 100644 --- a/Makefile +++ b/Makefile @@ -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), \