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.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 B86D8158087 for ; Sun, 30 Jan 2022 09:24:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 173532BC05A; Sun, 30 Jan 2022 09:24:25 +0000 (UTC) Received: from smtp.gentoo.org (mail.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F367A2BC055 for ; Sun, 30 Jan 2022 09:24:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 33107342B34 for ; Sun, 30 Jan 2022 09:24:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C572E2BF for ; Sun, 30 Jan 2022 09:24:21 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1643530367.00cd31a1d41d0580b2f9ac765badb234e0643ea2.vapier@gentoo> Subject: [gentoo-commits] proj/autotools-wrappers:main commit in: / X-VCS-Repository: proj/autotools-wrappers X-VCS-Files: ac-wrapper.sh X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 00cd31a1d41d0580b2f9ac765badb234e0643ea2 X-VCS-Branch: main Date: Sun, 30 Jan 2022 09:24:21 +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: f5059032-b162-4bd0-bdad-027944354851 X-Archives-Hash: 1b88bc39e242706190af5c88d20c57be commit: 00cd31a1d41d0580b2f9ac765badb234e0643ea2 Author: Mike Frysinger gentoo org> AuthorDate: Sun Jan 30 08:12:47 2022 +0000 Commit: Mike Frysinger gentoo 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 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