aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuildos5
1 files changed, 4 insertions, 1 deletions
diff --git a/buildos b/buildos
index fb5f85c..012869b 100755
--- a/buildos
+++ b/buildos
@@ -526,7 +526,10 @@ function toolchain_fetch () # <toolchain-name> <line>
declare -g "${tp}toolchain_ver=$tv"
echo "$tv" >"$tr/version"
else
- l="$(sed -n -re "s/^(.+)-$tv(.*)$/\1\2/p" <<<"$f")"
+ # For files other that build2-toolchain we expect the version component to
+ # be in the <ver>[-<name>] form, for example 1.2.3-stage.
+ #
+ l="$(sed -n -re "s/^(.+)-$tv(-$tn)?(.*)$/\1\3/p" <<<"$f")"
fi
if [ -z "$l" ]; then