From: Jan Michel Date: Fri, 19 Jul 2013 11:00:37 +0000 (+0200) Subject: proper path usage & closing files X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=ee7688edcb22eed48ff3e9530b6a58ff89e8af4b;p=mvdsensorcontrol.git proper path usage & closing files --- 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;