Changeset 10470


Ignore:
Timestamp:
2005-08-10T16:30:08+12:00 (19 years ago)
Author:
mdewsnip
Message:

Added missing language option and fixed a new bug that prevented it from being used from the GLI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/explode_metadata_database.pl

    r10338 r10470  
    2626my $arguments =
    2727    [
     28      { 'name' => "language",
     29    'desc' => "{scripts.language}",
     30    'type' => "string",
     31    'reqd' => "no" },
    2832      { 'name' => "plugin",
    2933    'desc' => "{explode.plugin}",
     
    8892    # parse the options
    8993    my $intArgLeftinAfterParsing = parse2::parse(\@ARGV,$arguments,$hashParsingResult,"allow_extra_options");
     94
     95    foreach my $strVariable (keys %$hashParsingResult)
     96    {
     97    eval "\$$strVariable = \$hashParsingResult->{\"\$strVariable\"}";
     98    }
     99
     100    # If $language has been specified, load the appropriate resource bundle
     101    # (Otherwise, the default resource bundle will be loaded automatically)
     102    if ($language && $language =~ /\S/) {
     103    &gsprintf::load_language_specific_resource_bundle($language);
     104    }
     105
     106    if ($xml) {
     107        &PrintUsage::print_xml_usage($options);
     108    print "\n";
     109    return;
     110    }
     111
    90112    # There should one arg left after parsing
    91113    if($intArgLeftinAfterParsing > 1)
     
    93115    &PrintUsage::print_txt_usage($options, "{explode.params}");
    94116    die "\n";
    95     }
    96 
    97     foreach my $strVariable (keys %$hashParsingResult)
    98     {
    99     eval "\$$strVariable = \$hashParsingResult->{\"\$strVariable\"}";
    100     }
    101        
    102     # If $language has been specified, load the appropriate resource bundle
    103     # (Otherwise, the default resource bundle will be loaded automatically)
    104     if ($language && $language =~ /\S/) {
    105     &gsprintf::load_language_specific_resource_bundle($language);
    106     }
    107 
    108     if ($xml) {
    109         &PrintUsage::print_xml_usage($options);
    110     print "\n";
    111     return;
    112117    }
    113118
Note: See TracChangeset for help on using the changeset viewer.