From 865f363090f86d3c9db5fcd1ef11d3946102ac66 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Mon, 8 Jul 2013 18:21:24 +0200 Subject: [PATCH] added possibility to set config path by $JTAGCONFIGPATH --- soft/toolbox/jtag_atomic/libs/Config/Abstract.pm | 1 + soft/toolbox/jtag_atomic/ui.pl | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/soft/toolbox/jtag_atomic/libs/Config/Abstract.pm b/soft/toolbox/jtag_atomic/libs/Config/Abstract.pm index cbe19a9..12cab05 100644 --- a/soft/toolbox/jtag_atomic/libs/Config/Abstract.pm +++ b/soft/toolbox/jtag_atomic/libs/Config/Abstract.pm @@ -264,6 +264,7 @@ sub _read_settings{ @conflines = @{$settingdata}; }else{ my $settingsfile = $settingdata; + $settingsfile = $ENV{'JTAGCONFIGPATH'}."/".$settingsfile if exists $ENV{'JTAGCONFIGPATH'}; # Read in the ini file we want to use # Probably not a good idea to die on error at this # point, but that's what we've got for the moment diff --git a/soft/toolbox/jtag_atomic/ui.pl b/soft/toolbox/jtag_atomic/ui.pl index 9f8ac91..2fcedc7 100755 --- a/soft/toolbox/jtag_atomic/ui.pl +++ b/soft/toolbox/jtag_atomic/ui.pl @@ -169,6 +169,7 @@ sub execute_shell_command_return { my $boardsfile= 'boards.ini'; +$boardsfile = $ENV{'JTAGCONFIGPATH'}."/".$boardsfile if exists($ENV{'JTAGCONFIGPATH'}); my $boardsSettings = new Config::Abstract::Ini($boardsfile); my %allboards = $boardsSettings->get_all_settings; foreach my $board (keys %allboards) { @@ -226,7 +227,7 @@ foreach my $board (keys %allboards) { exit(0); } - +$chainsini = $ENV{'JTAGCONFIGPATH'}."/".$chainsini if exists($ENV{'JTAGCONFIGPATH'}); my $chainsSettings = new Config::Abstract::Ini($chainsini); my %allchains = $chainsSettings->get_all_settings; if(!defined($allchains{$opt_chain})) { die ("Chain $opt_chain not found.");} -- 2.43.0