diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-03-30 11:27:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-03-30 11:27:54 +0200 |
commit | a222b03d3942d380e24042cc8c14f6215cd45749 (patch) | |
tree | 5601a13c55e3f863007726a9f616af160afc5e2a /init | |
parent | 73dfb006998bfca6410411c698ac52595264bb9c (diff) |
Add support for having multiple toolchains on single OS instance
Diffstat (limited to 'init')
-rwxr-xr-x | init | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -88,13 +88,19 @@ readarray -t cmdline < <(cat /proc/cmdline | \ # info "command line:" for v in "${cmdline[@]}"; do - var="$(sed -r -n -e 's/^buildos\.([^=]+)=.*$/\1/p' <<<"$v")" # Extract name. + var="$(sed -n -re 's/^buildos\.([^=]+)=.*$/\1/p' <<<"$v")" # Extract name. if [ -n "$var" ]; then - val="$(sed -r -e 's/^[^=]+=(.*)$/\1/' <<<"$v")" # Extract value. - val="$(sed -r -e "s/^('(.*)'|\"(.*)\")$/\2\3/" <<<"$val")" # Strip quoted. + val="$(sed -re 's/^[^=]+=(.*)$/\1/' <<<"$v")" # Extract value. + val="$(sed -re "s/^('(.*)'|\"(.*)\")$/\2\3/" <<<"$val")" # Strip quoted. info " $var=$val" - declare "$var=$val" + + # If the variable contains a dot, then it is a toolchain variable and we + # don't care about those in init. + # + if [[ "$var" != *.* ]]; then + declare "$var=$val" + fi fi done |