Changeset 12613
- Timestamp:
- 2006-08-30T15:49:44+12:00 (18 years ago)
- Location:
- trunk/gsdl/bin/script
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/classinfo.pl
r12545 r12613 105 105 106 106 # If there is not exactly 1 argument left (classifier name), then the arguments were wrong 107 # Or if the user specified -h, then we output the usage also108 if( $intArgLeftinAfterParsing != 1 ||(@ARGV && $ARGV[0] =~ /^\-+h/) )107 # If the user specified -h, then we output the usage also 108 if((@ARGV && $ARGV[0] =~ /^\-+h/) ) 109 109 { 110 110 PrintUsage::print_txt_usage($options, "{classinfo.params}"); 111 111 die "\n"; 112 } 113 114 # If there is not exactly 1 argument left (plugin name), then the arguments were wrong (apart from if we had listall or describeall set) 115 if ($listall == 0 && $describeall ==0 && $intArgLeftinAfterParsing == 0) { 116 gsprintf(STDERR, "{pluginfo.no_plugin_name}\n\n"); 117 PrintUsage::print_txt_usage($options, "{pluginfo.params}", 1); 118 die "\n"; 119 } 120 121 # we had some arguments that we weren't expecting 122 if ($intArgLeftinAfterParsing > 1) { 123 pop(@ARGV); # assume that the last arg is the plugin name 124 gsprintf(STDERR, "{common.invalid_options}\n\n", join (',', @ARGV)); 125 PrintUsage::print_txt_usage($options, "{pluginfo.params}", 1); 126 die "\n"; 112 127 } 113 128 … … 116 131 if (defined $classifier) { 117 132 $classifier =~ s/\.pm$//; # allow xxx.pm as the argument 118 }119 if (($listall == 0 && $describeall == 0) && (!defined $classifier || $classifier eq "")) {120 &gsprintf(STDERR, "{classinfo.no_classifier_name}\n\n");121 &PrintUsage::print_txt_usage($options, "{classinfo.params}", 1);122 die "\n";123 133 } 124 134 -
trunk/gsdl/bin/script/pluginfo.pl
r12545 r12613 127 127 128 128 # If there is not exactly 1 argument left (plugin name), then the arguments were wrong 129 # Or if the user specified -h, then we output the usage also130 if( $unparsed_args != 1 ||(@ARGV && $ARGV[0] =~ /^\-+h/) )129 # If the user specified -h, then we output the usage also 130 if((@ARGV && $ARGV[0] =~ /^\-+h/) ) 131 131 { 132 132 PrintUsage::print_txt_usage($options, "{pluginfo.params}"); 133 133 die "\n"; 134 134 } 135 135 136 # If there is not exactly 1 argument left (plugin name), then the arguments were wrong (apart from if we had listall or describeall set) 137 if ($listall == 0 && $describeall ==0 && $unparsed_args == 0) { 138 gsprintf(STDERR, "{pluginfo.no_plugin_name}\n\n"); 139 PrintUsage::print_txt_usage($options, "{pluginfo.params}", 1); 140 die "\n"; 141 } 142 143 # we had some arguments that we weren't expecting 144 if ($unparsed_args > 1) { 145 pop(@ARGV); # assume that the last arg is the plugin name 146 gsprintf(STDERR, "{common.invalid_options}\n\n", join (',', @ARGV)); 147 PrintUsage::print_txt_usage($options, "{pluginfo.params}", 1); 148 die "\n"; 149 } 150 136 151 my $plugin = shift (@ARGV); 137 152 if (defined $plugin) { 138 153 $plugin =~ s/\.pm$//; # allow xxxPlug.pm as the argument 139 }140 if (($listall == 0 && $describeall ==0) && (!defined $plugin || $plugin eq "")) {141 gsprintf(STDERR, "{pluginfo.no_plugin_name}\n\n");142 PrintUsage::print_txt_usage($options, "{pluginfo.params}", 1);143 die "\n";144 154 } 145 155
Note:
See TracChangeset
for help on using the changeset viewer.