From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1377551-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id B7A9E15808B
	for <garchives@archives.gentoo.org>; Sat, 19 Mar 2022 19:43:55 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0AADBE0825;
	Sat, 19 Mar 2022 19:43:55 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id E3A37E0825
	for <gentoo-commits@lists.gentoo.org>; Sat, 19 Mar 2022 19:43:54 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id EF5BF343071
	for <gentoo-commits@lists.gentoo.org>; Sat, 19 Mar 2022 19:43:53 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 68E72D0
	for <gentoo-commits@lists.gentoo.org>; Sat, 19 Mar 2022 19:43:52 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1647718987.4dae15d9b786650329fa92f9a7ddc0116e6f5acc.sam@gentoo>
Subject: [gentoo-commits] proj/qa-scripts:master commit in: /
X-VCS-Repository: proj/qa-scripts
X-VCS-Files: check-eapis.sh eapi-usage.sh eapi_usage.sh
X-VCS-Directories: /
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 4dae15d9b786650329fa92f9a7ddc0116e6f5acc
X-VCS-Branch: master
Date: Sat, 19 Mar 2022 19:43:52 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 75e5d568-3bb1-44dd-8ffc-4daf53221d9d
X-Archives-Hash: 5f8359e43b9d748156c2c2951d39741a

commit:     4dae15d9b786650329fa92f9a7ddc0116e6f5acc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 19 19:43:07 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 19 19:43:07 2022 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=4dae15d9

eapi-usage.sh: rename from eapi_usage.sh; absorb check-eapis.sh

Both eapi_usage.sh and check-eapis.sh do very similar things,
so let's combine the two.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 check-eapis.sh => eapi-usage.sh | 26 ++++++++++++++++++++++++++
 eapi_usage.sh                   | 27 ---------------------------
 2 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/check-eapis.sh b/eapi-usage.sh
similarity index 64%
rename from check-eapis.sh
rename to eapi-usage.sh
index 78fa30a..77758bd 100755
--- a/check-eapis.sh
+++ b/eapi-usage.sh
@@ -55,3 +55,29 @@ popd &>/dev/null || exit 1
 mv ${TMPDIR}/eapi-usage/*.txt ${dir}/ || exit 1
 
 rm -r "${TMPDIR}" || exit 1
+
+# Now generate the numbers/summary (copied in from previous eapi_usage.sh script)
+# Boring 'script' that just uses pkgcore's pinspect command. Someday it would be
+# nice to graph this output, or maybe keep some running history?
+
+#[[ $(type pinspect 2> /dev/null) ]] || exit 1
+#
+#pinspect eapi_usage /usr/portage
+echo "<pre>"
+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<eapi[i]*50./NR+0.5; j++) s=s"#"
+        printf "EAPI %s: %7d ebuilds (%5.02f%%)  %s\n",
+               i, eapi[i], eapi[i]*100.0/NR, s
+       }
+       printf "total:  %7d ebuilds\n", NR
+    }'
+
+echo
+echo "Date generated: $(date -u '+%Y-%m-%d %H:%M:%S %Z')"
+echo "</pre>"

diff --git a/eapi_usage.sh b/eapi_usage.sh
deleted file mode 100755
index 94bdfcb..0000000
--- a/eapi_usage.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-# Boring 'script' that just uses pkgcore's pinspect command. Someday it would be
-# nice to graph this output, or maybe keep some running history?
-
-#[[ $(type pinspect 2> /dev/null) ]] || exit 1
-#
-#pinspect eapi_usage /usr/portage
-
-echo "<pre>"
-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<eapi[i]*50./NR+0.5; j++) s=s"#"
-        printf "EAPI %s: %7d ebuilds (%5.02f%%)  %s\n",
-               i, eapi[i], eapi[i]*100.0/NR, s
-       }
-       printf "total:  %7d ebuilds\n", NR
-    }'
-
-echo
-echo "Date generated: $(date -u '+%Y-%m-%d %H:%M:%S %Z')"
-echo "</pre>"