diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-01-26 13:23:54 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-01-26 13:23:54 +0000 |
commit | 4e9362688c95ac02bafc014a16bbfd399b86ca8c (patch) | |
tree | bfbfc81a885a0fa97e89b13a9c0b87c1024f23ce | |
parent | gcc-config: add basic version sorting support (diff) | |
download | gcc-config-4e9362688c95ac02bafc014a16bbfd399b86ca8c.tar.gz gcc-config-4e9362688c95ac02bafc014a16bbfd399b86ca8c.tar.bz2 gcc-config-4e9362688c95ac02bafc014a16bbfd399b86ca8c.zip |
gcc-config: fix numbered access to toolchains
In commit bc80e12ab1 ("gcc-config: add basic version sorting support")
i've missed the case of accessing toolchain by number:
$ gcc-config -L 1
The change adds version sorting to numbered access as well.
Reported-by: lekto@o2.pl
Bug: https://bugs.gentoo.org/706318
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rwxr-xr-x | gcc-config | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1015,7 +1015,7 @@ for x in "$@" ; do if [[ -z $(echo ${x} | tr -d '[:digit:]') ]] ; then # User gave us a # representing the profile i=1 - for y in "${GCC_ENV_D}"/* ; do + for y in $(version_sorted_paths "${GCC_ENV_D}"/*) ; do [[ -f ${y} ]] || continue [[ ${y} == */config* ]] && continue |