Fix "Evaluate 'script' in the global scope"

This fixes commit Evaluate 'script' in the global scope. It caused
Windows builds behave differently than before because path was evaluated twice
and backslashes from Windows' paths got unescaped and effectively wiped out.
Configs could only be passed with "-f ../dir/config.cfg" or "-f
..\\dir\\config.cfg" instead of usual "-f dir/config.cfg" (or using backslash)
as previously.

Change-Id: I13b4abac6dbe6d770cc11a4e61c9421ef340da83
Author: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/40
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
Freddie Chopin 2011-10-22 09:53:55 +02:00 committed by Spencer Oliver
parent e5fd6131fe
commit ea10093422
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ add_help_text find "print full path to file according to OpenOCD search rules"
# Find and run a script
proc script {filename} {
uplevel #0 source [find $filename]
uplevel #0 [list source [find $filename]]
}
add_help_text script "filename of OpenOCD script (tcl) to run"
add_usage_text script "<file>"