fbtenv: link toolchain to current on *nix

This commit is contained in:
hedger 2024-02-12 22:58:48 +00:00
parent c8e62ba5e8
commit 7e7c2b746c
No known key found for this signature in database
GPG Key ID: BC19012910E3C2CF

View File

@ -203,9 +203,12 @@ fbtenv_show_unpack_percentage()
fbtenv_unpack_toolchain()
{
echo "Unpacking toolchain to '$FBT_TOOLCHAIN_PATH/toolchain':";
rm $FBT_TOOLCHAIN_PATH/toolchain/current || true;
tar -xvf "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_TAR" -C "$FBT_TOOLCHAIN_PATH/toolchain" 2>&1 | fbtenv_show_unpack_percentage;
mkdir -p "$FBT_TOOLCHAIN_PATH/toolchain" || return 1;
mv "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_DIR" "$TOOLCHAIN_ARCH_DIR" || return 1;
printf "linking toolchain to 'current'..";
ln -s "$TOOLCHAIN_ARCH_DIR" "$FBT_TOOLCHAIN_PATH/toolchain/current" || return 1;
echo "done";
return 0;
}