diff options
author | Leah Neukirchen <leah@vuxu.org> | 2021-01-27 23:42:31 +0000 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2021-01-30 14:20:43 +0000 |
commit | 6ecbbf767a9d202d00d4eb069ec819e28d75a6a6 (patch) | |
tree | ac1d70eb6229d0d6a3fa012613352495d96f6b69 | |
parent | 26ec8902ecffcf25e82059ef3c9890fa71bd511c (diff) | |
download | void-packages-6ecbbf767a9d202d00d4eb069ec819e28d75a6a6.tar void-packages-6ecbbf767a9d202d00d4eb069ec819e28d75a6a6.tar.gz void-packages-6ecbbf767a9d202d00d4eb069ec819e28d75a6a6.tar.bz2 void-packages-6ecbbf767a9d202d00d4eb069ec819e28d75a6a6.tar.lz void-packages-6ecbbf767a9d202d00d4eb069ec819e28d75a6a6.tar.xz void-packages-6ecbbf767a9d202d00d4eb069ec819e28d75a6a6.tar.zst void-packages-6ecbbf767a9d202d00d4eb069ec819e28d75a6a6.zip |
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.
-rw-r--r-- | common/hooks/pre-pkg/03-rewrite-python-shebang.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh index 22f506155a0..60e7f61975b 100644 --- a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh +++ b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh @@ -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 |