From 62e605325e1296ef7ff77a84790d6c8a8ed1a61f Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 9 Mar 2017 11:54:05 +0100 Subject: [PATCH] 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 { ... } --- tool/run/run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/run/run b/tool/run/run index 7145201b74..68a7e1b356 100755 --- a/tool/run/run +++ b/tool/run/run @@ -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 ""] } }