git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Gernhardt <brian@gernhardtsoftware.com>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] Makefile: Remove excess backslashes from sed
Date: Thu,  8 Apr 2010 23:22:10 -0400	[thread overview]
Message-ID: <1270783330-35215-1-git-send-email-brian@gernhardtsoftware.com> (raw)

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

             reply	other threads:[~2010-04-09  3:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-09  3:22 Brian Gernhardt [this message]
2010-04-09  5:57 ` [PATCH] Makefile: Remove excess backslashes from sed 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
  -- strict thread matches above, loose matches on Subject: below --
2010-04-09 14:41 Brian Gernhardt
2010-04-09 14:44 ` Brian Gernhardt

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1270783330-35215-1-git-send-email-brian@gernhardtsoftware.com \
    --to=brian@gernhardtsoftware.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
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).