mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
tool/run: add install_boot_module function
This function largely alleviates the need to manually open/close files in run scripts such as sculpt.run.
This commit is contained in:
parent
46c9927294
commit
fd105e16aa
16
tool/run/run
16
tool/run/run
@ -209,13 +209,23 @@ proc check_config {bin xml_file xsd_file label avail_xsd_files xsd_inc nesting_l
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
# Install boot module with the given 'name' and content
|
||||
#
|
||||
proc install_boot_module { name args } {
|
||||
|
||||
set fh [open [file join [run_dir] genode $name] "WRONLY CREAT TRUNC"]
|
||||
puts $fh [join $args {}]
|
||||
close $fh
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
# Install content of specified variable as init config file
|
||||
#
|
||||
proc install_config { args } {
|
||||
set fh [open "[run_dir]/genode/config" "WRONLY CREAT TRUNC"]
|
||||
puts $fh [join $args {}]
|
||||
close $fh
|
||||
|
||||
install_boot_module "config" [join $args {}]
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user