hooks/pre-pkg/03-rewrite-python-shebang.sh: use grep -r instead of find.
This saves us one sed execution per file in the destdir, resulting in a major speedup. Grep will only consider text files and only look at the first line.
This commit is contained in:
parent
26ec8902ec
commit
6ecbbf767a
|
@ -16,7 +16,7 @@ hook() {
|
|||
default_shebang="#!/usr/bin/python${pyver%.*}"
|
||||
fi
|
||||
|
||||
find "${PKGDESTDIR}" -type f -print0 | \
|
||||
grep -rlIZ -m1 '^#!.*python' "${PKGDESTDIR}" |
|
||||
while IFS= read -r -d '' file; do
|
||||
[ ! -s "$file" ] && continue
|
||||
|
||||
|
|
Loading…
Reference in New Issue