Changeset 134 for trunk/gsdl/perllib
- Timestamp:
- 1999-02-02T22:59:06+13:00 (25 years ago)
- Location:
- trunk/gsdl/perllib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/docsave.pm
r98 r134 21 21 $self->{'archive_info'} = $archive_info; 22 22 23 # set a default for the archive directory 24 $self->{'archive_dir'} = "$ENV{'GSDLHOME'}/collect/$self->{'collection'}/archives"; 25 23 26 return bless $self, $class; 27 } 28 29 sub setarchivedir { 30 my $self = shift (@_); 31 my ($archive_dir) = @_; 32 33 $self->{'archive_dir'} = $archive_dir; 24 34 } 25 35 … … 28 38 my ($doc_obj) = @_; 29 39 30 my $archive_dir = "$ENV{'GSDLHOME'}/collect/$self->{'collection'}/archives";40 my $archive_dir = $self->{'archive_dir'}; 31 41 my $OID = $doc_obj->get_OID(); 32 42 $OID = "NULL" unless defined $OID; … … 39 49 # same one. 40 50 $doc_dir = $doc_info->[0]; 51 $doc_dir =~ s/\/?doc\.gml$//; 41 52 42 53 } else { -
trunk/gsdl/perllib/mgbuilder.pm
r98 r134 34 34 35 35 # read in the collection configuration file 36 if (!-e "$ENV{'GSDL HOME'}/collect/$collection/etc/collect.cfg") {36 if (!-e "$ENV{'GSDLCOLLECTDIR'}/etc/collect.cfg") { 37 37 die "mgbuilder::new - couldn't find collect.cfg for collection $collection\n"; 38 38 } … … 71 71 # otherwise, use the mg buildproc 72 72 my ($buildprocdir, $buildproctype); 73 if (-e "$ENV{'GSDL HOME'}/collect/$collection/perllib/${collection}buildproc.pm") {74 $buildprocdir = "$ENV{'GSDL HOME'}/collect/$collection/perllib";73 if (-e "$ENV{'GSDLCOLLECTDIR'}/perllib/${collection}buildproc.pm") { 74 $buildprocdir = "$ENV{'GSDLCOLLECTDIR'}/perllib"; 75 75 $buildproctype = "${collection}buildproc"; 76 76 } else { … … 102 102 sub compress_text { 103 103 my $self = shift (@_); 104 my ($textindex) = @_; 104 105 my $exedir = "$ENV{'GSDLHOME'}/bin/$ENV{'GSDLOS'}"; 105 106 my $exe = &util::get_os_exe (); … … 121 122 $self->{'buildproc'}->set_output_handle ('mgbuilder::PIPEOUT'); 122 123 $self->{'buildproc'}->set_mode ('text'); 123 $self->{'buildproc'}->set_index ( 'section:text');124 $self->{'buildproc'}->set_index ($textindex); 124 125 125 126 # collect the statistics for the text -
trunk/gsdl/perllib/plugin.pm
r16 r134 3 3 package plugin; 4 4 5 require util; 5 6 6 7 sub load_plugins { … … 10 11 foreach $plugin (@$plugin_list) { 11 12 # find the plugin 12 if (-e "$ENV{'GSDLHOME'}/collect/$collection/perllib/plugins/${plugin}.pm") { 13 require "$ENV{'GSDLHOME'}/collect/$collection/perllib/plugins/${plugin}.pm"; 14 15 } elsif (-e "$ENV{'GSDLHOME'}/perllib/plugins/${plugin}.pm") { 16 require "$ENV{'GSDLHOME'}/perllib/plugins/${plugin}.pm"; 17 18 } else { 19 die "ERROR - couldn't find plugin $plugin\n"; 20 } 13 my $colplugname = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"perllib/plugins", 14 "${plugin}.pm"); 15 my $mainplugname = &util::filename_cat($ENV{'GSDLHOME'},"perllib/plugins", 16 "${plugin}.pm"); 17 if (-e $colplugname) { require $colplugname; } 18 elsif (-e $mainplugname) { require $mainplugname; } 19 else { die "ERROR - couldn't find plugin $plugin\n"; } 21 20 22 21 # create a plugin object … … 44 43 } 45 44 46 print STDERR "WARNING - no plugin could process $base_dir$file\n"; 45 print STDERR "WARNING - no plugin could process " . 46 &util::filename_cat($base_dir,$file) . "\n"; 47 47 } 48 48
Note:
See TracChangeset
for help on using the changeset viewer.