{"thread":{"id":"37172","subject":"[PATCH] Fix contrib/subtree Makefile to patch #! line","startedAt":"2014-07-19T16:08:57Z","lastAt":"2014-07-19T16:08:57Z","messageCount":1,"participants":["Charles Bailey"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"246383","messageId":"1405786137-30019-1-git-send-email-charles@hashpling.org","threadId":"37172","inReplyTo":null,"subject":"[PATCH] Fix contrib/subtree Makefile to patch #! line","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2014-07-19T16:08:57Z","receivedAt":"2014-07-19T16:08:57Z","isPatch":true,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"From: Charles Bailey <cbailey32@bloomberg.net>\n\nSigned-off-by: Charles Bailey <cbailey32@bloomberg.net>\n---\nThe main Git Makefile does this, but not the contrib/subtree Makefile.\nSHELL_PATH should be respected if set (especially on Solaris where\n/bin/sh is very legacy).\n\nThe sed command is a copy of one of the ones used for installing .sh\nfiles by the main Git Makefile.\n\n contrib/subtree/Makefile | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile\nindex d888d45..d9a0ce2 100644\n--- a/contrib/subtree/Makefile\n+++ b/contrib/subtree/Makefile\n@@ -18,6 +18,11 @@ RM       ?= rm -f\n ASCIIDOC = asciidoc\n XMLTO    = xmlto\n \n+ifndef SHELL_PATH\n+\tSHELL_PATH = /bin/sh\n+endif\n+SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n+\n ASCIIDOC_CONF = ../../Documentation/asciidoc.conf\n MANPAGE_XSL   = ../../Documentation/manpage-normal.xsl\n \n@@ -32,7 +37,8 @@ GIT_SUBTREE_HTML := git-subtree.html\n all: $(GIT_SUBTREE)\n \n $(GIT_SUBTREE): $(GIT_SUBTREE_SH)\n-\tcp $< $@ && chmod +x $@\n+\tsed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' $< >$@\n+\tchmod +x $@\n \n doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)\n \n-- \n2.0.2.611.g8c85416\n"}]}