diff options
author | aszlig <aszlig@redmoonstudios.org> | 2014-07-29 06:53:17 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2014-07-29 06:53:17 +0200 |
commit | 21a2f99dd300385c98bdc32691d4631233441ff5 (patch) | |
tree | 5540a9cec0d5bebc1dca5114049ba3d1ea0d84c4 /pkgs/development/python-modules | |
parent | ff15c31c37dc7f1b68432a9ea74b84e89d3462b3 (diff) | |
download | nixpkgs-21a2f99dd300385c98bdc32691d4631233441ff5.tar nixpkgs-21a2f99dd300385c98bdc32691d4631233441ff5.tar.gz nixpkgs-21a2f99dd300385c98bdc32691d4631233441ff5.tar.bz2 nixpkgs-21a2f99dd300385c98bdc32691d4631233441ff5.tar.lz nixpkgs-21a2f99dd300385c98bdc32691d4631233441ff5.tar.xz nixpkgs-21a2f99dd300385c98bdc32691d4631233441ff5.tar.zst nixpkgs-21a2f99dd300385c98bdc32691d4631233441ff5.zip |
python-wrapper: Fix handling of line breaks.
Not really critical for anything we have in <nixpkgs> 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 <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/generic/wrap.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index 0193bd82837..857f002cace 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")'"' }' |