xbps-src: introduce python_version

This commit is contained in:
Alessio Sergi 2016-11-17 17:37:37 +01:00
parent a28fd5497d
commit 29c37543cf
4 changed files with 13 additions and 1 deletions

View file

@ -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