Ignore:
Timestamp:
2011-10-11T11:24:25+13:00 (13 years ago)
Author:
davidb
Message:

Support for -site in pluginfo.pl added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/pluginfo.pl

    r22518 r24748  
    6969
    7070my $arguments =
    71     [ { 'name' => "collection",
     71    [ { 'name' => "site",
     72    'desc' => "{pluginfo.site}",
     73    'type' => "string",
     74    'reqd' => "no" },
     75      { 'name' => "collection",
    7276    'desc' => "{pluginfo.collection}",
    7377    'type' => "string",
     
    101105
    102106sub main {
     107    my $site = "";
    103108    my $collection = "";
    104109    my $xml = 0;
     
    177182    }
    178183
    179     if ($collection ne "") {
    180     $ENV{'GSDLCOLLECTDIR'} = &util::filename_cat ($ENV{'GSDLHOME'}, "collect", $collection);
    181     } else {
    182     $ENV{'GSDLCOLLECTDIR'} = $ENV{'GSDLHOME'};
     184    if ($site ne "") {
     185    # assume Greenstone 3
     186    if ($collection ne "") {
     187        $ENV{'GSDLCOLLECTDIR'} = &util::filename_cat ($ENV{'GSDL3HOME'}, "sites", $site, "collect", $collection);
     188    } else {
     189        # Probably more useful to default to GS2 area for plugins
     190        $ENV{'GSDLCOLLECTDIR'} = $ENV{'GSDLHOME'};
     191    }
     192    }
     193    else {
     194    if ($collection ne "") {
     195        $ENV{'GSDLCOLLECTDIR'} = &util::filename_cat ($ENV{'GSDLHOME'}, "collect", $collection);
     196    } else {
     197        $ENV{'GSDLCOLLECTDIR'} = $ENV{'GSDLHOME'};
     198    }
    183199    }
    184200
Note: See TracChangeset for help on using the changeset viewer.