Changeset 29096 for main/trunk/greenstone2/perllib/buildcolutils.pm
- Timestamp:
- 2014-06-12T12:18:42+12:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/buildcolutils.pm
r29079 r29096 83 83 if ($intArgLeftinAfterParsing == -1) 84 84 { 85 &PrintUsage::print_txt_usage($options, "{buildcol.params}"); 85 &PrintUsage::print_txt_usage($options, "{buildcol.params}",1); 86 print STDERR "Something went wrong during parsing the arguments. Scroll up for details.\n"; 86 87 die "\n"; 87 88 } … … 110 111 &gsprintf::output_strings_in_UTF8; 111 112 } 112 113 114 # If the user specified -h, then we output the usage 115 if (@$argv && $argv->[0] =~ /^\-+h/) { 116 &PrintUsage::print_txt_usage($options, "{buildcol.params}"); 117 die "\n"; 118 } 119 113 120 # now check that we had exactly one leftover arg, which should be 114 121 # the collection name. We don't want to do this earlier, cos 115 122 # -xml arg doesn't need a collection name 116 # Or if the user specified -h, then we output the usage also117 if ($intArgLeftinAfterParsing != 1 || (@ARGV && $ARGV[0] =~ /^\-+h/))118 {119 &PrintUsage::print_txt_usage($options, "{buildcol.params}");123 if ($intArgLeftinAfterParsing != 1) 124 { 125 &PrintUsage::print_txt_usage($options, "{buildcol.params}", 1); 126 print STDERR "There should be one argument left after parsing the script args: the collection name.\n"; 120 127 die "\n"; 121 128 } … … 163 170 if (($collection = &colcfg::use_collection($site, $collection, $collectdir)) eq "") 164 171 { 165 &PrintUsage::print_txt_usage($options, "{buildcol.params}");172 #&PrintUsage::print_txt_usage($options, "{buildcol.params}", 1); 166 173 die "\n"; 167 174 }
Note:
See TracChangeset
for help on using the changeset viewer.