public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/autotools-wrappers:main commit in: /
Date: Sun, 30 Jan 2022 09:24:21 +0000 (UTC)	[thread overview]
Message-ID: <1643530367.00cd31a1d41d0580b2f9ac765badb234e0643ea2.vapier@gentoo> (raw)

commit:     00cd31a1d41d0580b2f9ac765badb234e0643ea2
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:12:47 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:12:47 2022 +0000
URL:        https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=00cd31a1

autoconf-wrapper: simplify known version list

Since the 2.1/2.5 version aliases are inlined in the WANT_AUTOCONF
parse logic now, there's no need to keep annotating every specific
version with it.  Drop it to simplify the logic a bit.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 57324bb..bd9a8d9 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -78,14 +78,13 @@ fi
 # Set up bindings between actual version and WANT_AUTOCONF;
 # Start at last known unstable/stable versions to speed up lookup process.
 #
-KNOWN_AUTOCONF="2.71:2.5 2.70:2.5 2.69:2.5"
-vers="${KNOWN_AUTOCONF} 9999:2.5 $(printf '2.%s:2.5 ' `seq 99 -1 59`) 2.13:2.1"
+KNOWN_AUTOCONF="2.71 2.70 2.69"
+vers="${KNOWN_AUTOCONF} 9999 $(printf '2.%s ' `seq 99 -1 59`) 2.13"
 
 binary=""
 for v in ${vers} ; do
-	auto_ver=${v%:*}
-	if [ -z "${binary}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then
-		binary="${full_argv0}-${auto_ver}"
+	if [ -z "${binary}" ] && [ -x "${full_argv0}-${v}" ] ; then
+		binary="${full_argv0}-${v}"
 		break
 	fi
 done
@@ -107,7 +106,6 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
 			break
 		fi
 
-		auto_ver=${v%:*}
 		for wx in ${WANT_AUTOCONF} ; do
 			if [ "${wx}" = "latest" ] ; then
 				wx="2.5"
@@ -119,12 +117,12 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
 				v="x"
 				break
 			elif [ "${wx}" = "2.5" ] ; then
-				if [ "${auto_ver}" = "2.13" ] ; then
+				if [ "${v}" = "2.13" ] ; then
 					# The "2.5" alias accepts every version except 2.13.
 					continue
 				fi
-				if [ -x "${full_argv0}-${auto_ver}" ] ; then
-					binary="${full_argv0}-${auto_ver}"
+				if [ -x "${full_argv0}-${v}" ] ; then
+					binary="${full_argv0}-${v}"
 					v="x"
 					break
 				fi
@@ -191,9 +189,8 @@ fi
 #
 if [ -z "${WANT_AUTOCONF}" ] ; then
 	for v in ${vers} ; do
-		auto_ver=${v%:*}
-		if [ "${binary}" = "${full_argv0}-${auto_ver}" ] ; then
-			export WANT_AUTOCONF="${auto_ver}"
+		if [ "${binary}" = "${full_argv0}-${v}" ] ; then
+			export WANT_AUTOCONF="${v}"
 			break
 		fi
 	done


             reply	other threads:[~2022-01-30  9:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-30  9:24 Mike Frysinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-07 13:27 [gentoo-commits] proj/autotools-wrappers:main commit in: / Sam James
2023-12-24  0:55 Sam James
2022-12-07 20:46 Sam James
2022-11-22 21:20 Sam James
2022-11-22 21:20 Sam James
2022-02-08  2:58 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-30  9:24 Mike Frysinger
2022-01-29 20:35 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1643530367.00cd31a1d41d0580b2f9ac765badb234e0643ea2.vapier@gentoo \
    --to=vapier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox