hooks/11-pkglint-elf-in-usrshare: make use of bashisms to fix stuff.
using for-loop causes the loop to hang at filenames with -. Use while read instead with bash process substitution so it avoids the subshell problem.
This commit is contained in:
parent
150c0a4872
commit
75e535d257
1 changed files with 3 additions and 2 deletions
|
@ -11,12 +11,13 @@ hook() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Find all binaries in /usr/share and add them to the pool
|
# Find all binaries in /usr/share and add them to the pool
|
||||||
for f in $(find $PKGDESTDIR/usr/share -type f); do
|
while read -r f; do
|
||||||
case "$(file -bi "$f")" in
|
case "$(file -bi "$f")" in
|
||||||
|
# Note application/x-executable is missing which is present in most Electron apps
|
||||||
application/x-sharedlib*|application/x-pie-executable*)
|
application/x-sharedlib*|application/x-pie-executable*)
|
||||||
matches+=" ${f#$PKGDESTDIR}" ;;
|
matches+=" ${f#$PKGDESTDIR}" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done < <(find $PKGDESTDIR/usr/share -type f)
|
||||||
|
|
||||||
if [ -z "$matches" ]; then
|
if [ -z "$matches" ]; then
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue