diff options
author | Enno Boland <g@s01.de> | 2017-04-17 06:49:06 +0000 |
---|---|---|
committer | Juan RP <xtraeme@gmail.com> | 2017-04-17 06:49:06 +0000 |
commit | 571e42ffcef4456a5ffbb0aba1fed2a4a5ab1c62 (patch) | |
tree | a1980dab4a262822f4225c9371f4e98c12c0dd1e /common/hooks/pre-pkg | |
parent | 91e6b2a2cddba877a2b4d46b68d9520ad978df6d (diff) | |
download | void-packages-571e42ffcef4456a5ffbb0aba1fed2a4a5ab1c62.tar void-packages-571e42ffcef4456a5ffbb0aba1fed2a4a5ab1c62.tar.gz void-packages-571e42ffcef4456a5ffbb0aba1fed2a4a5ab1c62.tar.bz2 void-packages-571e42ffcef4456a5ffbb0aba1fed2a4a5ab1c62.tar.lz void-packages-571e42ffcef4456a5ffbb0aba1fed2a4a5ab1c62.tar.xz void-packages-571e42ffcef4456a5ffbb0aba1fed2a4a5ab1c62.tar.zst void-packages-571e42ffcef4456a5ffbb0aba1fed2a4a5ab1c62.zip |
03-rewrite-python-shebang.sh: don't rewrite versioned python scripts (#6155)
fixes #6151.
Diffstat (limited to 'common/hooks/pre-pkg')
-rw-r--r-- | common/hooks/pre-pkg/03-rewrite-python-shebang.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh index 40487d73a7c..81e45b9821f 100644 --- a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh +++ b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh @@ -19,9 +19,9 @@ hook() { fi shebang="#!/usr/bin/python${pyver%.*}" - find ${PKGDESTDIR} -type f -print0 | \ - xargs -0 grep -H -b -m 1 "^#!.*\([[:space:]]\|/\)python\([[:space:]]*\|$\)" -- | while IFS=: read -r f off _; do - [ -z "$off" ] && continue + find "${PKGDESTDIR}" -type f -print0 | \ + xargs -0 grep -H -b -m 1 "^#!.*\([[:space:]]\|/\)python\([0-9]\.[0-9]\)\?\([[:space:]]\+\|$\)" -- | while IFS=: read -r f off _; do + [ -z "$off" ] && continue echo " Shebang converted to '$shebang': ${f#$PKGDESTDIR}" sed -i "1s@.*python.*@${shebang}@" -- "$f" done |