From 3e8c4ebde298a0242d9964ee615c96cb256fe871 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 5 Jul 2017 16:36:27 +0200 Subject: [PATCH] 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 '' config node is defined by the return value of the 'query_pkg' function: install_config { ... ... } --- tool/run/run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/run/run b/tool/run/run index 3be0f84e63..3f0c43dd7e 100755 --- a/tool/run/run +++ b/tool/run/run @@ -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