Skip to content

Commit

Permalink
Fix contrib/subtree Makefile to patch #! line
Browse files Browse the repository at this point in the history
Signed-off-by: Charles Bailey <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
hashpling authored and gitster committed Jul 21, 2014
1 parent 398dd4b commit da33a97
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion contrib/subtree/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)

Expand Down

0 comments on commit da33a97

Please sign in to comment.