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 B193A1382C5 for ; Mon, 19 Mar 2018 23:06:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03832E09DD; Mon, 19 Mar 2018 23:06:14 +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 D1267E09DD for ; Mon, 19 Mar 2018 23:06:13 +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 A2878335C75 for ; Mon, 19 Mar 2018 23:06:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 23BA6244 for ; Mon, 19 Mar 2018 23:06:11 +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: <1521500638.8a87de18707ceffbda8bb11bad8d3048e6a0d408.ulm@gentoo> Subject: [gentoo-commits] proj/qa-scripts:master commit in: / X-VCS-Repository: proj/qa-scripts X-VCS-Files: eapi_usage.sh X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 8a87de18707ceffbda8bb11bad8d3048e6a0d408 X-VCS-Branch: master Date: Mon, 19 Mar 2018 23:06:11 +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-Archives-Salt: 92a825a8-b528-4549-9634-32ed114830a3 X-Archives-Hash: 8f97ac1e9d4877c67d591a91ccff249b commit: 8a87de18707ceffbda8bb11bad8d3048e6a0d408 Author: Ulrich Müller gentoo org> AuthorDate: Mon Mar 19 23:03:58 2018 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Mon Mar 19 23:03:58 2018 +0000 URL: https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=8a87de18 eapi_usage.sh: Replace first awk by grep. This should make it slightly more robust. Don't exclude files names Manifest* as it may be a valid package name. eapi_usage.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/eapi_usage.sh b/eapi_usage.sh index 9ed0819..29c3831 100755 --- a/eapi_usage.sh +++ b/eapi_usage.sh @@ -7,20 +7,18 @@ # #pinspect eapi_usage /usr/portage -find /usr/portage/metadata/md5-cache -type f \ - ! -name '*.gz' ! -name 'Manifest*' -exec awk ' - /^EAPI=/ { sub("EAPI=",""); eapi[$1]++; nextfile } - END { for (i in eapi) print i,eapi[i] } - ' '{}' '+' | awk ' - { eapi[$1]+=$2; total+=$2 } +find /usr/portage/metadata/md5-cache -type f ! -name '*.gz' \ + -exec grep -h '^EAPI=' '{}' + \ + | awk ' + { sub("EAPI=",""); eapi[$1]++ } END { PROCINFO["sorted_in"]="@val_num_desc" for (i in eapi) { - s=""; for (j=1; j