From: Devin Lehmacher <lehmacdj@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] Makefile: escape ' in bin-wrappers rule
Date: Thu, 16 Mar 2017 02:17:38 -0400 [thread overview]
Message-ID: <20170316061738.26760-1-lehmacdj@gmail.com> (raw)
If the pwd contains a ' escape it as '\'' so that git will not fail
while building on a path containing '.
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index ed68700ac..5cf5d8537 100644
--- a/Makefile
+++ b/Makefile
@@ -2276,7 +2276,7 @@ all:: $(NO_INSTALL)
bin-wrappers/%: wrap-for-bin.sh
@mkdir -p bin-wrappers
$(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
- -e 's|@@BUILD_DIR@@|$(shell pwd)|' \
+ -e 's|@@BUILD_DIR@@|$(shell pwd | sed -e "s/'/'\\\''/g")|' \
-e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%,$(@F))|' < $< > $@ && \
chmod +x $@
--
2.11.0
next reply other threads:[~2017-03-16 6:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 6:17 Devin Lehmacher [this message]
2017-03-16 11:24 ` [PATCH] Makefile: escape ' in bin-wrappers rule Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170316061738.26760-1-lehmacdj@gmail.com \
--to=lehmacdj@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).