xbps-src: limit the search to the /usr/lib/pythonX.Y directory

This commit is contained in:
Alessio Sergi 2016-10-27 15:17:02 +02:00
parent afc50a1290
commit d77d6cde40
2 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ _EOF
# Handle python bytecode archives with pycompile trigger.
#
if [ -d ${PKGDESTDIR}/usr/lib/python* ]; then
pycompile_version="$(find ${PKGDESTDIR}/usr/lib/python* -type d | grep -o '[[:digit:]]\.[[:digit:]]$')"
pycompile_version="$(find ${PKGDESTDIR}/usr/lib/python* -prune -type d | grep -o '[[:digit:]]\.[[:digit:]]$')"
fi
if [ -n "${pycompile_dirs}" -o -n "${pycompile_module}" ]; then

View File

@ -11,7 +11,7 @@ hook() {
fi
if [ -d ${PKGDESTDIR}/usr/lib/python* ]; then
pyver="$(find ${PKGDESTDIR}/usr/lib/python* -type d | grep -o '[[:digit:]]\.[[:digit:]]$')"
pyver="$(find ${PKGDESTDIR}/usr/lib/python* -prune -type d | grep -o '[[:digit:]]\.[[:digit:]]$')"
fi
if [ -n "$pycompile_version" ]; then