.cfg files are now executed as Jim Tcl. Commands that terminate script w/error message.

git-svn-id: svn://svn.berlios.de/openocd/trunk@790 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2008-07-11 09:06:36 +00:00
parent 0f2dfabd3b
commit 381f9a2e8a
5 changed files with 25 additions and 78 deletions

View File

@@ -110,15 +110,7 @@ int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]
break;
case 'f': /* --file | -f */
{
char *t=strrchr(optarg, '.');
if (strcmp(t, ".tcl")==0)
{
/* Files ending in .tcl are executed as Tcl files */
snprintf(command_buffer, 128, "source [find {%s}]", optarg);
} else
{
snprintf(command_buffer, 128, "script %s", optarg);
}
snprintf(command_buffer, 128, "script %s", optarg);
add_config_command(command_buffer);
break;
}