summaryrefslogtreecommitdiff
path: root/contrib/subtree
diff options
context:
space:
mode:
authorCharles Bailey <cbailey32@bloomberg.net>2014-07-19 16:08:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-21 17:39:48 (GMT)
commitda33a97998f6d6206c08bd72a527f5b8e6e26d33 (patch)
tree32ff07b3d77cfa00b19cf6970087a1e008c82fc4 /contrib/subtree
parent398dd4bd039680ba98497fbedffa415a43583c16 (diff)
downloadgit-da33a97998f6d6206c08bd72a527f5b8e6e26d33.zip
git-da33a97998f6d6206c08bd72a527f5b8e6e26d33.tar.gz
git-da33a97998f6d6206c08bd72a527f5b8e6e26d33.tar.bz2
Fix contrib/subtree Makefile to patch #! line
Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/subtree')
-rw-r--r--contrib/subtree/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index d888d45..d9a0ce2 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -18,6 +18,11 @@ RM ?= rm -f
ASCIIDOC = asciidoc
XMLTO = xmlto
+ifndef SHELL_PATH
+ SHELL_PATH = /bin/sh
+endif
+SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
+
ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
MANPAGE_XSL = ../../Documentation/manpage-normal.xsl
@@ -32,7 +37,8 @@ GIT_SUBTREE_HTML := git-subtree.html
all: $(GIT_SUBTREE)
$(GIT_SUBTREE): $(GIT_SUBTREE_SH)
- cp $< $@ && chmod +x $@
+ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' $< >$@
+ chmod +x $@
doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)