Fix contrib/subtree Makefile to patch #! line

Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Charles Bailey committed Jul 19, 2014 at 17:08 UTC da33a97998f6d6206c08bd72a527f5b8e6e26d33
1 file changed +7 -1
contrib/subtree/Makefile
+7 -1
@@ -18,6 +18,11 @@ RM ?= rm -f
18 ASCIIDOC = asciidoc
19 XMLTO = xmlto
20
21 +ifndef SHELL_PATH
22 + SHELL_PATH = /bin/sh
23 +endif
24 +SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
25 +
26 ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
27 MANPAGE_XSL = ../../Documentation/manpage-normal.xsl
28
@@ -32,7 +37,8 @@ GIT_SUBTREE_HTML := git-subtree.html
37 all: $(GIT_SUBTREE)
38
39 $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
35 - cp $< $@ && chmod +x $@
40 + sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' $< >$@
41 + chmod +x $@
42
43 doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
44