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 | 2041dd468477b966571b19b0290835c60c5dbffb (patch) | |
tree | 6371562ea645724d29e966d4daea3a628bf9e7c6 /eclass | |
parent | Version bump (bug #466880). (diff) | |
download | gentoo-2-2041dd468477b966571b19b0290835c60c5dbffb.tar.gz gentoo-2-2041dd468477b966571b19b0290835c60c5dbffb.tar.bz2 gentoo-2-2041dd468477b966571b19b0290835c60c5dbffb.zip |
use arrays & globs to get slightly better dynamic coverage for config.sub lookups #470146
Diffstat (limited to '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}' } |