diff options
author | Leah Rowe <leah@libreboot.org> | 2024-12-30 17:59:19 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-12-30 17:59:19 +0000 |
commit | cfb6de94c3367d761e3db4d549c03e1a8360b0a3 (patch) | |
tree | d0485692f341e352b595e41226673eeeaa3120ac | |
parent | ec2f07166624634d937715f4407cd19c0aaa8996 (diff) |
trees: correction on check_gnu_path
i intend for this function to work generically,
matching gnat to gcc or gcc to gnat, but there was
a hangover from the previous code where it specifically
assumed we were matching gnat
this bug manifested when i tested with gnat being v13
and gcc being v14 in path, where gcc-13 was also
available in path.
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-x | script/trees | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script/trees b/script/trees index d07f3254..09240af0 100755 --- a/script/trees +++ b/script/trees @@ -232,7 +232,7 @@ check_gnu_path() eval "[ \"\$$_gnuarg\" = \"gnat\" ] && continue" $err "check_gnu_path: Invalid argument \"$_gnuarg\"" done - command -v $1 1>/dev/null || $err "Host gcc unavailable" + command -v $1 1>/dev/null || $err "Host '$1' unavailable" eval `setvars "" gccver gccfull gnatver gnatfull gccdir gnatdir` gnu_setver "$1" "$1" || $err "Command '$1' unavailable." @@ -246,7 +246,7 @@ check_gnu_path() for _gnubin in "$_gnudir/$2-"*; do [ -f "$_gnubin" ] || continue [ "${_gnubin#"$_gnudir/$2-"}" = "$_gnuver" ] || continue - gnatver="${_gnubin#"$_gnudir/$2-"}"; break + _gnuver="${_gnubin#"$_gnudir/$2-"}"; break done gnu_setver "$2" "$_gnudir/$2-$_gnuver" || return 1 [ "$gnatfull" = "$gccfull" ] || return 1 |