From 29c37543cf75436b4c602fd1a0f16a11b3c05539 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Thu, 17 Nov 2016 17:37:37 +0100 Subject: xbps-src: introduce python_version --- common/hooks/pre-pkg/03-rewrite-python-shebang.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common/hooks/pre-pkg') 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 -- cgit v1.2.3