template_setup_posix: Fix command line toolchain flag handling

The commit 05f6047344 moved the toolchain
list from the setup script itself to an external file
(`sdk_toolchains`).

This change also introduced a delimiter change from 'SPACE' to 'LF'
that broke the regular expression used by the toolchain (`-t`) flag
handler, which assumes the 'SPACE' delimiter.

This commit reworks the setup script to convert the 'LF' delimiter to
'SPACE' after loading the toolchain list from `sdk_toolchains` to fix
this issue.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2022-11-19 20:34:04 +09:00
parent 1b5188fe62
commit 9faa004020
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ pushd "$(dirname "${BASH_SOURCE[0]}")"
# Initialise toolchain list
toolchains=$(<sdk_toolchains)
toolchains=("${toolchains[@]//$'\n'/ }")
# Initialise list of toolchains to install
inst_toolchains=()