From ee7688edcb22eed48ff3e9530b6a58ff89e8af4b Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Fri, 19 Jul 2013 13:00:37 +0200 Subject: [PATCH] proper path usage & closing files --- tools/startup.pl | 11 ++++++++--- tools/xml2ini.pl | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/startup.pl b/tools/startup.pl index 7c6e98c..50442d5 100755 --- a/tools/startup.pl +++ b/tools/startup.pl @@ -33,16 +33,21 @@ die "DAQOPSERVER not set in environment. Points to trbnetd that provides access die "JTAGPATH not set in environment. Points to JTAG tools (e.g. ui.pl).\n" unless (defined $ENV{'JTAGPATH'}); unless (defined $ENV{'JTAGCONFIGPATH'}) { - printf "JTAGCONFIGPATH not set in environment. Points to JTAG config files (e.g. chains.ini). Using default.\n" if $verbose; + printf "JTAGCONFIGPATH not set in environment. Points to JTAG config files (e.g. chains.ini). Using default $defaultIniPath\n" if $verbose; $ENV{'JTAGCONFIGPATH'} = $defaultIniPath; - mkdir($defaultIniPath) unless (-e $defaultIniPath); } unless (defined $ENV{'XMLPATH'}) { - printf "XMLPATH not set in environment. Points to XML file directory. Using default.\n" if $verbose; + printf "XMLPATH not set in environment. Points to XML file directory. Using default $defaultXmlPath\n" if $verbose; $ENV{'XMLPATH'} = $defaultXmlPath; } + +$defaultIniPath = $ENV{'JTAGCONFIGPATH'}; +$defaultXmlPath = $ENV{'XMLPATH'}; +mkdir($defaultIniPath) unless (-e $defaultIniPath); + + ############################### ## Read setup xml file ############################### diff --git a/tools/xml2ini.pl b/tools/xml2ini.pl index 9ec3854..cf0188b 100755 --- a/tools/xml2ini.pl +++ b/tools/xml2ini.pl @@ -234,7 +234,7 @@ for my $specRegister ( @specRegisters){ - +close OUTPUT; -- 2.43.0