mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
run: concatenate 'install_config' args
This patch enables one to supply a list of arguments to 'install_config'. The arguments appear concatenated in the resulting config file. This is useful for embedding dynamically generated content into an otherwise static configuration. For example, in the following config, the 'pkg' attribute of the '<query>' config node is defined by the return value of the 'query_pkg' function: install_config { <config> ... <start name="depot_query"> ... <config> <query pkg="genodelabs/pkg/} [query_pkg] {"/> </config> </start> </config>}
This commit is contained in:
parent
5f4ca67cf9
commit
3e8c4ebde2
@ -108,9 +108,9 @@ proc check_xml_syntax {xml_file} {
|
||||
##
|
||||
# Install content of specfied variable as init config file
|
||||
#
|
||||
proc install_config {config} {
|
||||
proc install_config { args } {
|
||||
set fh [open "[run_dir]/genode/config" "WRONLY CREAT TRUNC"]
|
||||
puts $fh $config
|
||||
puts $fh [join $args {}]
|
||||
close $fh
|
||||
|
||||
check_xml_syntax [run_dir]/genode/config
|
||||
|
Loading…
x
Reference in New Issue
Block a user