From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 15CCC138334 for ; Thu, 18 Jul 2019 09:55:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 57FF6E0849; Thu, 18 Jul 2019 09:55:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3DA79E0849 for ; Thu, 18 Jul 2019 09:55:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 088C9347FC3 for ; Thu, 18 Jul 2019 09:55:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A6AB6627 for ; Thu, 18 Jul 2019 09:55:50 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1563373607.e45e4d50192591385607e892caba9542ea07127e.ulm@gentoo> Subject: [gentoo-commits] proj/qa-scripts:master commit in: / X-VCS-Repository: proj/qa-scripts X-VCS-Files: find-binary-files.sh X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: e45e4d50192591385607e892caba9542ea07127e X-VCS-Branch: master Date: Thu, 18 Jul 2019 09:55:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 10cdd7a5-8034-4492-84ac-2af355ef8dcd X-Archives-Hash: 150ccb706b6e6551bda2628db43c83a2 commit: e45e4d50192591385607e892caba9542ea07127e Author: Ulrich Müller gentoo org> AuthorDate: Wed Jul 17 14:26:47 2019 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Wed Jul 17 14:26:47 2019 +0000 URL: https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=e45e4d50 find-binary-files.sh: Output explicit message if no files were found. Signed-off-by: Ulrich Müller gentoo.org> find-binary-files.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/find-binary-files.sh b/find-binary-files.sh index 2c08ca8..3b62e22 100755 --- a/find-binary-files.sh +++ b/find-binary-files.sh @@ -8,10 +8,8 @@ shopt -s extglob portdir=$(portageq get_repo_path / gentoo) cd "${portdir}" || exit 1 -find . \( -path ./distfiles -o -path ./local -o -path ./metadata \ - -o -path ./packages \) -prune \ - -o ! -type d ! \( -type f -name 'Manifest*.gz' \) -exec file -ih '{}' + \ -| while read line; do +count=0 +while read line; do path=${line%:*} type=${line##*:*( )} case ${type} in @@ -39,7 +37,11 @@ find . \( -path ./distfiles -o -path ./local -o -path ./metadata \ *) size=$(stat -c "%s" "${path}") echo "${path#./}: ${type} (size=${size})" + (( count++ )) ;; esac -done \ -| sort +done < <(find \( -path ./distfiles -o -path ./local -o -path ./metadata \ + -o -path ./packages \) -prune -o ! -type d ! -name 'Manifest*.gz' \ + -exec file -ih '{}' + | sort) + +[[ ${count} -gt 0 ]] || echo "No binary files found. :-)"