From afb86c7c5acb721853035bf2a3bf942f2bad01e0 Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Sun, 7 Apr 2013 14:11:53 +0200 Subject: [PATCH] padiwa.pl now prints help message instead of useless warnings if called incorrectly --- padiwa.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/padiwa.pl b/padiwa.pl index 8659c55..af7a9e0 100755 --- 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"; -- 2.43.0