1 |
vapier 13/05/22 06:03:08 |
2 |
|
3 |
Modified: gnuconfig.eclass |
4 |
Log: |
5 |
use arrays & globs to get slightly better dynamic coverage for config.sub lookups #470146 |
6 |
|
7 |
Revision Changes Path |
8 |
1.35 eclass/gnuconfig.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnuconfig.eclass?rev=1.35&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnuconfig.eclass?rev=1.35&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnuconfig.eclass?r1=1.34&r2=1.35 |
13 |
|
14 |
Index: gnuconfig.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/gnuconfig.eclass,v |
17 |
retrieving revision 1.34 |
18 |
retrieving revision 1.35 |
19 |
diff -u -r1.34 -r1.35 |
20 |
--- gnuconfig.eclass 15 Sep 2012 16:16:53 -0000 1.34 |
21 |
+++ gnuconfig.eclass 22 May 2013 06:03:08 -0000 1.35 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2012 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnuconfig.eclass,v 1.34 2012/09/15 16:16:53 zmedico Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnuconfig.eclass,v 1.35 2013/05/22 06:03:08 vapier Exp $ |
27 |
# |
28 |
# THIS ECLASS IS DEAD: It has been integrated into portage |
29 |
# |
30 |
@@ -87,15 +87,13 @@ |
31 |
# this searches the standard locations for the newest config.{sub|guess}, and |
32 |
# returns the directory where they can be found. |
33 |
gnuconfig_findnewest() { |
34 |
- local locations=" |
35 |
+ local locations=( |
36 |
+ /usr/share/misc/config.sub |
37 |
/usr/share/gnuconfig/config.sub |
38 |
- /usr/share/automake-1.9/config.sub |
39 |
- /usr/share/automake-1.8/config.sub |
40 |
- /usr/share/automake-1.7/config.sub |
41 |
- /usr/share/automake-1.6/config.sub |
42 |
- /usr/share/automake-1.5/config.sub |
43 |
- /usr/share/automake-1.4/config.sub |
44 |
+ /usr/share/automake*/config.sub |
45 |
/usr/share/libtool/config.sub |
46 |
- " |
47 |
- grep -s '^timestamp' ${locations} | sort -n -t\' -k2 | tail -n 1 | sed 's,/config.sub:.*$,,' |
48 |
+ ) |
49 |
+ grep -s '^timestamp' "${locations[@]}" | \ |
50 |
+ sort -r -n -t\' -k2 | \ |
51 |
+ sed -n '1{s,/config.sub:.*$,,;p;q}' |
52 |
} |