diff options
author | Alessio Sergi <al3hex@gmail.com> | 2016-11-17 16:37:37 +0000 |
---|---|---|
committer | Alessio Sergi <al3hex@gmail.com> | 2016-11-17 16:42:54 +0000 |
commit | 29c37543cf75436b4c602fd1a0f16a11b3c05539 (patch) | |
tree | 655720a3cd89de39c558d7ed77bbe55decfb3283 /common/hooks/pre-pkg | |
parent | a28fd5497d1da29770ed1ae191835364bbc50d79 (diff) | |
download | void-packages-29c37543cf75436b4c602fd1a0f16a11b3c05539.tar void-packages-29c37543cf75436b4c602fd1a0f16a11b3c05539.tar.gz void-packages-29c37543cf75436b4c602fd1a0f16a11b3c05539.tar.bz2 void-packages-29c37543cf75436b4c602fd1a0f16a11b3c05539.tar.lz void-packages-29c37543cf75436b4c602fd1a0f16a11b3c05539.tar.xz void-packages-29c37543cf75436b4c602fd1a0f16a11b3c05539.tar.zst void-packages-29c37543cf75436b4c602fd1a0f16a11b3c05539.zip |
xbps-src: introduce python_version
Diffstat (limited to 'common/hooks/pre-pkg')
-rw-r--r-- | common/hooks/pre-pkg/03-rewrite-python-shebang.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh index ebd8d55db97..40487d73a7c 100644 --- a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh +++ b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh @@ -14,6 +14,10 @@ hook() { pyver="$pycompile_version" fi + if [ "$python_version" = "3" ]; then + pyver="$python_version" + 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 |