1 |
commit: 4e9362688c95ac02bafc014a16bbfd399b86ca8c |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 26 13:23:54 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 26 13:23:54 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=4e936268 |
7 |
|
8 |
gcc-config: fix numbered access to toolchains |
9 |
|
10 |
In commit bc80e12ab1 ("gcc-config: add basic version sorting support") |
11 |
i've missed the case of accessing toolchain by number: |
12 |
|
13 |
$ gcc-config -L 1 |
14 |
|
15 |
The change adds version sorting to numbered access as well. |
16 |
|
17 |
Reported-by: lekto <AT> o2.pl |
18 |
Bug: https://bugs.gentoo.org/706318 |
19 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
20 |
|
21 |
gcc-config | 2 +- |
22 |
1 file changed, 1 insertion(+), 1 deletion(-) |
23 |
|
24 |
diff --git a/gcc-config b/gcc-config |
25 |
index 1ab646b..8b4fd20 100755 |
26 |
--- a/gcc-config |
27 |
+++ b/gcc-config |
28 |
@@ -1015,7 +1015,7 @@ for x in "$@" ; do |
29 |
if [[ -z $(echo ${x} | tr -d '[:digit:]') ]] ; then |
30 |
# User gave us a # representing the profile |
31 |
i=1 |
32 |
- for y in "${GCC_ENV_D}"/* ; do |
33 |
+ for y in $(version_sorted_paths "${GCC_ENV_D}"/*) ; do |
34 |
[[ -f ${y} ]] || continue |
35 |
[[ ${y} == */config* ]] && continue |