Changeset 12615
- Timestamp:
- 2006-08-30T16:00:35+12:00 (18 years ago)
- Location:
- trunk/gsdl/bin/script
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/downloadinfo.pl
r12545 r12615 88 88 # parse returns -1 on error 89 89 if ($unparsed_args == -1) { 90 PrintUsage::print_txt_usage($options, "{ pluginfo.params}");90 PrintUsage::print_txt_usage($options, "{downloadinfo.params}"); 91 91 die "\n"; 92 92 } … … 127 127 # Or if the user specified -h, then we output the usage also 128 128 129 if( $unparsed_args != 1 ||(@ARGV && $ARGV[0] =~ /^\-+h/) )129 if((@ARGV && $ARGV[0] =~ /^\-+h/) ) 130 130 { 131 131 PrintUsage::print_txt_usage($options, "{downloadinfo.params}"); … … 133 133 } 134 134 135 # If there is not exactly 1 argument left (download name), then the arguments were wrong (apart from if we had listall or describeall set) 136 if ($listall == 0 && $describeall ==0 && $unparsed_args == 0) { 137 gsprintf(STDERR, "{downloadinfo.no_download_name}\n\n"); 138 PrintUsage::print_txt_usage($options, "{downloadinfo.params}", 1); 139 die "\n"; 140 } 141 142 # we had some arguments that we weren't expecting 143 if ($unparsed_args > 1) { 144 pop(@ARGV); # assume that the last arg is the download name 145 gsprintf(STDERR, "{common.invalid_options}\n\n", join (',', @ARGV)); 146 PrintUsage::print_txt_usage($options, "{downloadinfo.params}", 1); 147 die "\n"; 148 } 135 149 my $download_name = shift (@ARGV); 136 150 if (defined $download_name) { 137 151 $download_name =~ s/\.pm$//; # allow xxx.pm as the argument 138 }139 if (($listall == 0 && $describeall ==0) && (!defined $download_name || $download_name eq "")) {140 gsprintf(STDERR, "{downloadinfo.no_download_name}\n\n");141 PrintUsage::print_txt_usage($options, "{downloadinfo.params}", 1);142 die "\n";143 152 } 144 153 -
trunk/gsdl/bin/script/plugoutinfo.pl
r12545 r12615 130 130 # If there is not exactly 1 argument left (plugout name), then the arguments were wrong 131 131 # Or if the user specified -h, then we output the usage also 132 if( $unparsed_args != 1 || (@ARGV && $ARGV[0] =~ /^\-+h/))132 if(@ARGV && $ARGV[0] =~ /^\-+h/ ) 133 133 { 134 134 PrintUsage::print_txt_usage($options, "{plugoutinfo.params}"); … … 136 136 } 137 137 138 # If there is not exactly 1 argument left (plugout name), then the arguments were wrong (apart from if we had listall or describeall set) 139 if ($listall == 0 && $describeall ==0 && $unparsed_args == 0) { 140 gsprintf(STDERR, "{plugoutinfo.no_plugout_name}\n\n"); 141 PrintUsage::print_txt_usage($options, "{plugoutinfo.params}", 1); 142 die "\n"; 143 } 144 145 # we had some arguments that we weren't expecting 146 if ($unparsed_args > 1) { 147 pop(@ARGV); # assume that the last arg is the plugout name 148 gsprintf(STDERR, "{common.invalid_options}\n\n", join (',', @ARGV)); 149 PrintUsage::print_txt_usage($options, "{plugoutinfo.params}", 1); 150 die "\n"; 151 } 152 138 153 my $plugout = shift (@ARGV); 139 154 if (defined $plugout) { 140 155 $plugout =~ s/\.pm$//; # allow xxxPlugout.pm as the argument 141 }142 if (($listall == 0 && $describeall ==0) && (!defined $plugout || $plugout eq "")) {143 gsprintf(STDERR, "{plugoutinfo.no_plugout_name}\n\n");144 PrintUsage::print_txt_usage($options, "{plugoutinfo.params}", 1);145 die "\n";146 156 } 147 157
Note:
See TracChangeset
for help on using the changeset viewer.