mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 02:40:08 +00:00
run: support variable arguments in append_if
This enables to use append_if like the append command in the following situation. proc optional_binary {} {...} append_if $optional config { <start name="} [optional_binary] {"> ... }
This commit is contained in:
parent
9cd3637035
commit
62e605325e
@ -72,9 +72,9 @@ proc create_boot_directory { } {
|
||||
##
|
||||
# Append string to variable only if 'condition' is satisfied
|
||||
#
|
||||
proc append_if {condition var string} {
|
||||
proc append_if {condition var args} {
|
||||
upvar $var up_var
|
||||
if {$condition} { append up_var $string }
|
||||
if {$condition} { append up_var [join $args ""] }
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user