git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: Remove excess backslashes from sed
@ 2010-04-09  3:22 Brian Gernhardt
  2010-04-09  5:57 ` Junio C Hamano
  2010-04-09  6:04 ` [PATCH] Makefile: Remove excess backslashes from sed David Aguilar
  0 siblings, 2 replies; 8+ messages in thread
From: Brian Gernhardt @ 2010-04-09  3:22 UTC (permalink / raw)
  To: Git List; +Cc: Junio C Hamano

The sed script that was intended to add lines altering the sys.path
had extra backslashes in them.  Instead resulting in

  import sys;  import os;  sys.path.insert( ... )

It output

  import sys; \ import os; \ sys.path.insert( ... )

Unfortunately this caused python (2.6.1 on OS X 10.6.3) to error

  SyntaxError: unexpected character after line continuation character

Removing two of the backslashes solves this problem.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
---

 I'm not sure if this is a result of OS X's python or sed, but t5800
 won't work for me without this change.

 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index f0fe351..b9eb1ca 100644
--- a/Makefile
+++ b/Makefile
@@ -1632,8 +1632,8 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py
 	sed -e '1{' \
 	    -e '	s|#!.*python|#!$(PYTHON_PATH_SQ)|' \
 	    -e '}' \
-	    -e 's|^import sys.*|&; \\\
-	           import os; \\\
+	    -e 's|^import sys.*|&; \
+	           import os; \
 	           sys.path.insert(0, os.getenv("GITPYTHONLIB",\
 	                                        "@@INSTLIBDIR@@"));|' \
 	    -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
-- 
1.7.1.rc0.210.ge6da

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

end of thread, other threads:[~2010-04-09 15:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-09  3:22 [PATCH] Makefile: Remove excess backslashes from sed Brian Gernhardt
2010-04-09  5:57 ` Junio C Hamano
2010-04-09  8:02   ` David Aguilar
2010-04-09  8:42     ` [PATCH] Makefile: Avoid multi-line sed when building python scripts David Aguilar
2010-04-09 14:33     ` [PATCH] Makefile: Remove excess backslashes from sed Brian Gernhardt
2010-04-09 15:34   ` Sverre Rabbelier
2010-04-09 15:35   ` [PATCH] Makefile: Simplify handling of python scripts Brian Gernhardt
2010-04-09  6:04 ` [PATCH] Makefile: Remove excess backslashes from sed David Aguilar

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 NNTP newsgroup(s).