Changeset 14958

Show
Ignore:
Timestamp:
12.02.2008 15:04:04 (11 years ago)
Author:
davidb
Message:

Functionality added so -listall option looks in Greenstone extension folders as well for plugins/classifiers.

Location:
gsdl/trunk/bin/script
Files:
2 modified

Legend:

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

    r14942 r14958  
    156156        @classifier_list = grep (/\.pm$/, readdir (INDIR)); 
    157157        closedir (INDIR); 
     158    } 
     159 
     160    if ((defined $ENV{'GSDLEXTS'}) && ($collection eq "")) { 
     161        my @extensions = split(/:/,$ENV{'GSDLEXTS'}); 
     162        foreach my $e (@extensions) { 
     163        my $ext_prefix = &util::filename_cat($ENV{'GSDLHOME'},"ext",$e); 
     164        my $ext_classify_dir = &util::filename_cat($ext_prefix, "perllib", "classify"); 
     165 
     166        if (opendir (INDIR, $ext_classify_dir)) { 
     167            my @ext_classifier_list = grep (/\.pm$/, readdir (INDIR)); 
     168            closedir (INDIR); 
     169 
     170            push(@classifier_list,@ext_classifier_list); 
     171        } 
     172 
     173        } 
    158174    } 
    159175 
  • gsdl/trunk/bin/script/pluginfo.pl

    r14942 r14958  
    176176        @plugin_list = grep (/Plug\.pm$/, readdir (INDIR)); 
    177177        closedir (INDIR); 
     178    } 
     179 
     180    if ((defined $ENV{'GSDLEXTS'}) && ($collection eq "")) { 
     181        my @extensions = split(/:/,$ENV{'GSDLEXTS'}); 
     182        foreach my $e (@extensions) { 
     183        my $ext_prefix = &util::filename_cat($ENV{'GSDLHOME'},"ext",$e); 
     184        my $ext_plugins_dir = &util::filename_cat($ext_prefix, "perllib", "plugins"); 
     185 
     186        if (opendir (INDIR, $ext_plugins_dir)) { 
     187            my @ext_plugin_list = grep (/Plug\.pm$/, readdir (INDIR)); 
     188            closedir (INDIR); 
     189 
     190            push(@plugin_list,@ext_plugin_list); 
     191        } 
     192 
     193        } 
    178194    } 
    179195