diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-05-22 06:03:08 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-05-22 06:03:08 +0000 |
commit | 326cf7e307d727da84ee8374cfff6adf78359bcb (patch) | |
tree | 5dece49ea3fd4f84e5d4a0ba92e800b248a9534f /eclass/gnuconfig.eclass | |
parent | Version bump (bug #466880). (diff) | |
download | historical-326cf7e307d727da84ee8374cfff6adf78359bcb.tar.gz historical-326cf7e307d727da84ee8374cfff6adf78359bcb.tar.bz2 historical-326cf7e307d727da84ee8374cfff6adf78359bcb.zip |
use arrays & globs to get slightly better dynamic coverage for config.sub lookups #470146
Diffstat (limited to 'eclass/gnuconfig.eclass')
-rw-r--r-- | eclass/gnuconfig.eclass | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/eclass/gnuconfig.eclass b/eclass/gnuconfig.eclass index 3a5e5c789ce8..7f5ce37208e6 100644 --- a/eclass/gnuconfig.eclass +++ b/eclass/gnuconfig.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/gnuconfig.eclass,v 1.34 2012/09/15 16:16:53 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/gnuconfig.eclass,v 1.35 2013/05/22 06:03:08 vapier Exp $ # # THIS ECLASS IS DEAD: It has been integrated into portage # @@ -87,15 +87,13 @@ gnuconfig_do_update() { # this searches the standard locations for the newest config.{sub|guess}, and # returns the directory where they can be found. gnuconfig_findnewest() { - local locations=" + local locations=( + /usr/share/misc/config.sub /usr/share/gnuconfig/config.sub - /usr/share/automake-1.9/config.sub - /usr/share/automake-1.8/config.sub - /usr/share/automake-1.7/config.sub - /usr/share/automake-1.6/config.sub - /usr/share/automake-1.5/config.sub - /usr/share/automake-1.4/config.sub + /usr/share/automake*/config.sub /usr/share/libtool/config.sub - " - grep -s '^timestamp' ${locations} | sort -n -t\' -k2 | tail -n 1 | sed 's,/config.sub:.*$,,' + ) + grep -s '^timestamp' "${locations[@]}" | \ + sort -r -n -t\' -k2 | \ + sed -n '1{s,/config.sub:.*$,,;p;q}' } |