From 21a2f99dd300385c98bdc32691d4631233441ff5 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 29 Jul 2014 06:53:17 +0200 Subject: [PATCH] python-wrapper: Fix handling of line breaks. Not really critical for anything we have in I guess, but skipping lines three times really was a workaround and we're better off just appending the lines ending with backslash to the pattern space so we can accumulate all the crap until the last line of crap (crap, that is "broken lines"). Signed-off-by: aszlig --- pkgs/development/python-modules/generic/wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index 0193bd828371..857f002cace9 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -28,7 +28,7 @@ wrapPythonProgramsIn() { echo "wrapping \`$i'..." sed -i "$i" -re '1 { /^#!/!b; :r - /\\$/{n;n;n;b r} + /\\$/{N;b r} /__future__|^ *(#.*)?$/{n;b r} /^ *[^# ]/i import sys; sys.argv[0] = '"'$(basename "$i")'"' }'