From: Fabian Groffen Date: Wed, 16 Sep 2009 18:11:06 +0000 (-0000) Subject: only look for executables, that makes more sense and removes a lot of matches, with... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=6e9ee1c05bc0caab0e87c35249c1c21eaf201ad9;p=portage.git only look for executables, that makes more sense and removes a lot of matches, with this reduction we no longer need to ignore usr/share/doc (in theory) svn path=/main/branches/prefix/; revision=14275 --- diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 14e9edad1..675a6c577 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -483,14 +483,15 @@ install_qa_check() { rm -f "${T}"/non-prefix-shebangs-errs local WHITELIST=" /usr/bin/env " # this is hell expensive, but how else? - find "${ED}" -type f | xargs grep -H -n -m1 "^#!" | while read f ; do + find "${ED}" -type f -executable \ + | xargs grep -H -n -m1 "^#!" \ + | while read f ; + do fn=${f%%:*} pos=${f#*:} ; pos=${pos%:*} line=${f##*:} # shebang always appears on the first line ;) [[ ${pos} != 1 ]] && continue - # remove some paths that often contain false positives - [[ ${fn} == "${ED}usr/share/doc/"* ]] && continue line=( ${line#"#!"} ) [[ ${WHITELIST} == *" ${line[0]} "* ]] && continue # does the shebang start with ${EPREFIX}?