From 75e535d25787b977f056e6c0515d002b1aa6d65e Mon Sep 17 00:00:00 2001 From: maxice8 Date: Thu, 10 Jan 2019 00:40:54 -0200 Subject: [PATCH] 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. --- common/hooks/post-install/11-pkglint-elf-in-usrshare.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/hooks/post-install/11-pkglint-elf-in-usrshare.sh b/common/hooks/post-install/11-pkglint-elf-in-usrshare.sh index a1cea83d99..484ceccaec 100644 --- a/common/hooks/post-install/11-pkglint-elf-in-usrshare.sh +++ b/common/hooks/post-install/11-pkglint-elf-in-usrshare.sh @@ -11,12 +11,13 @@ hook() { fi # 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 + # Note application/x-executable is missing which is present in most Electron apps application/x-sharedlib*|application/x-pie-executable*) matches+=" ${f#$PKGDESTDIR}" ;; esac - done + done < <(find $PKGDESTDIR/usr/share -type f) if [ -z "$matches" ]; then return 0