aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-24 17:59:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-24 17:59:29 +0200
commitb5f2019a23a27d34feaddf0182e5963de7b9bb29 (patch)
treefb343e503756a66461d030763cc63accbd9c3607
parent65cc91ea9851c188a22d0ea9f5ea37969d378c7b (diff)
Strip toolchain name (in any) from predictable name symlink
This is used to get predictable install script names.
-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