]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
padiwa.pl now prints help message instead of useless warnings if called incorrectly
authorAndreas Neiser <neiser@kph.uni-mainz.de>
Sun, 7 Apr 2013 12:11:53 +0000 (14:11 +0200)
committerAndreas Neiser <neiser@kph.uni-mainz.de>
Sun, 7 Apr 2013 12:11:53 +0000 (14:11 +0200)
padiwa.pl

index 8659c55de009468fb8c660136e569faee42252d2..af7a9e0da6437c1348b6218b543291908f0b9969 100755 (executable)
--- a/padiwa.pl
+++ b/padiwa.pl
@@ -6,13 +6,16 @@ use Data::Dumper;
 use HADES::TrbNet;
 use Date::Format;
 
-
+if(!defined $ENV{'DAQOPSERVER'}) {
+  die "DAQOPSERVER not set in environment";
+}
+  
 if (!defined &trb_init_ports()) {
   die("can not connect to trbnet-daemon on the $ENV{'DAQOPSERVER'}");
 }
-my $fh;
 
-if(!$ARGV[0]) {
+
+if(!(defined $ARGV[0]) || !(defined $ARGV[1]) || !(defined $ARGV[2])) {
   print "usage: padiwa.pl \$FPGA \$chain \$command \$options\n\n";
   print "\t uid \t\t read unique ID, no options\n";
   print "\t temp \t\t read temperature, no options\n";