xbps-src: consume all shebang arguments during rewrite

This commit is contained in:
Andrew J. Hesford 2020-06-16 20:00:09 -04:00 committed by Piotr
parent 9b72ff8ea9
commit 4ef9cff1d3

View File

@ -20,7 +20,7 @@ hook() {
while IFS= read -r -d '' file; do
[ ! -s "$file" ] && continue
pyinterp=$(sed -n -E -e 2q -e 's@^#!.*([[:space:]]|/)(python([0-9](\.[0-9]+)?)?)([[:space:]]+|$)@\2@p' "$file")
pyinterp=$(sed -n -E -e 2q -e 's@^#!.*([[:space:]]|/)(python([0-9](\.[0-9]+)?)?)([[:space:]]+.*|$)@\2@p' "$file")
[ -z "$pyinterp" ] && continue
pyver=${pyinterp#python}