{"thread":{"id":"23391","subject":"[PATCH] Makefile: Remove excess backslashes from sed","startedAt":"2010-04-09T14:41:47Z","lastAt":"2010-04-09T14:44:38Z","messageCount":2,"participants":["Brian Gernhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"139040","messageId":"1270824107-26604-1-git-send-email-brian@gernhardtsoftware.com","threadId":"23391","inReplyTo":null,"subject":"[PATCH] Makefile: Remove excess backslashes from sed","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2010-04-09T14:41:47Z","receivedAt":"2010-04-09T14:41:47Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"The sed script that was intended to add lines altering the sys.path\nhad extra backslashes in them.  Instead resulting in\n\n  import sys;  import os;  sys.path.insert( ... )\n\nIt output\n\n  import sys; \\ import os; \\ sys.path.insert( ... )\n\nUnfortunately this caused python (2.6.1 on OS X 10.6.3) to error\n\n  SyntaxError: unexpected character after line continuation character\n\nRemoving two of the backslashes solves this problem.\n\nSigned-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n---\n Makefile |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex f0fe351..b9eb1ca 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1632,8 +1632,8 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py\n \tsed -e '1{' \\\n \t    -e '\ts|#!.*python|#!$(PYTHON_PATH_SQ)|' \\\n \t    -e '}' \\\n-\t    -e 's|^import sys.*|&; \\\\\\\n-\t           import os; \\\\\\\n+\t    -e 's|^import sys.*|&; \\\n+\t           import os; \\\n \t           sys.path.insert(0, os.getenv(\"GITPYTHONLIB\",\\\n \t                                        \"@@INSTLIBDIR@@\"));|' \\\n \t    -e 's|@@INSTLIBDIR@@|'\"$$INSTLIBDIR\"'|g' \\\n-- \n1.7.1.rc0.243.g2ce66\n"},{"id":"139042","messageId":"6D2E98A1-3266-4799-8982-1C54A65CEB3A@silverinsanity.com","threadId":"23391","inReplyTo":"1270824107-26604-1-git-send-email-brian@gernhardtsoftware.com","subject":"Re: [PATCH] Makefile: Remove excess backslashes from sed","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2010-04-09T14:44:38Z","receivedAt":"2010-04-09T14:44:38Z","isPatch":true,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"This is the same patch as before.  I forgot --dry-run while testing git-send-email.  My apologies.\n\nOn Apr 9, 2010, at 10:41 AM, Brian Gernhardt wrote:\n\n> The sed script that was intended to add lines altering the sys.path\n> had extra backslashes in them.  Instead resulting in\n> \n>  import sys;  import os;  sys.path.insert( ... )\n> \n> It output\n> \n>  import sys; \\ import os; \\ sys.path.insert( ... )\n> \n> Unfortunately this caused python (2.6.1 on OS X 10.6.3) to error\n> \n>  SyntaxError: unexpected character after line continuation character\n> \n> Removing two of the backslashes solves this problem.\n> \n> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n> ---\n> Makefile |    4 ++--\n> 1 files changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/Makefile b/Makefile\n> index f0fe351..b9eb1ca 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -1632,8 +1632,8 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py\n> \tsed -e '1{' \\\n> \t    -e '\ts|#!.*python|#!$(PYTHON_PATH_SQ)|' \\\n> \t    -e '}' \\\n> -\t    -e 's|^import sys.*|&; \\\\\\\n> -\t           import os; \\\\\\\n> +\t    -e 's|^import sys.*|&; \\\n> +\t           import os; \\\n> \t           sys.path.insert(0, os.getenv(\"GITPYTHONLIB\",\\\n> \t                                        \"@@INSTLIBDIR@@\"));|' \\\n> \t    -e 's|@@INSTLIBDIR@@|'\"$$INSTLIBDIR\"'|g' \\\n> -- \n> 1.7.1.rc0.243.g2ce66\n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}