git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: Remove excess backslashes from sed

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Apr 9, 2010, 14:44 UTC
Message-ID
<6D2E98A1-3266-4799-8982-1C54A65CEB3A@silverinsanity.com>
In-Reply-To
<1270824107-26604-1-git-send-email-brian@gernhardtsoftware.com>
This is the same patch as before.  I forgot --dry-run while testing git-send-email.  My apologies.
On Apr 9, 2010, at 10:41 AM, Brian Gernhardt wrote:
Show 42 quoted lines
> 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>
> ---
> 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.243.g2ce66
> 
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Brian Gernhardt
Message 2 of 2 in “Makefile: Remove excess backslashes from sed”
  1. Makefile: Remove excess backslashes from sedBrian Gernhardt, Apr 9, 2010
  2. Brian GernhardtApr 9, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.