All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Makefile: escape ' in bin-wrappers rule
@ 2017-03-16  6:17 Devin Lehmacher
  2017-03-16 11:24 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Devin Lehmacher @ 2017-03-16  6:17 UTC (permalink / raw)
  To: git

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-16 11:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-16  6:17 [PATCH] Makefile: escape ' in bin-wrappers rule Devin Lehmacher
2017-03-16 11:24 ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.