From f48625c547398ee5f92d33e16b1a837c3c595ae9 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 24 Oct 2012 20:21:41 -0700 Subject: Use checkbashisms for init.d scripts, bug #439490 --- bin/misc-functions.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'bin') diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 9b280588c..db023e48a 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -558,6 +558,23 @@ install_qa_check() { done done + local checkbashisms=$(type -P checkbashisms) + if [[ -n ${checkbashisms} ]] ; then + for d in /etc/init.d ; do + [[ -d ${ED}${d} ]] || continue + for i in "${ED}${d}"/* ; do + [[ -e ${i} ]] || continue + [[ -L ${i} ]] && continue + f=$("${checkbashisms}" -f "${i}" 2>&1) + [[ $? != 0 && -n ${f} ]] || continue + eqawarn "QA Notice: shell script appears to use non-POSIX feature(s):" + while read -r ; + do eqawarn " ${REPLY}" + done <<< "${f//${ED}}" + done + done + fi + # Look for leaking LDFLAGS into pkg-config files f=$(egrep -sH '^Libs.*-Wl,(-O[012]|--hash-style)' "${ED}"/usr/*/pkgconfig/*.pc) if [[ -n ${f} ]] ; then -- cgit v1.2.3-1-g7c22