aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-01-26 13:23:54 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-01-26 13:23:54 +0000
commit4e9362688c95ac02bafc014a16bbfd399b86ca8c (patch)
treebfbfc81a885a0fa97e89b13a9c0b87c1024f23ce
parentgcc-config: add basic version sorting support (diff)
downloadgcc-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-xgcc-config2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc-config b/gcc-config
index 1ab646b..8b4fd20 100755
--- a/gcc-config
+++ b/gcc-config
@@ -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