Changeset 1614 for trunk/gsdl
- Timestamp:
- 2000-10-25T16:28:06+13:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/buildcol.pl
r1454 r1614 161 161 } 162 162 163 # build it in realbuilddir 163 164 # Phind installation check 165 # The phind phrase browser is research software and is not installed 166 # by defualt. If the user attepts to use it we warn them that it's a 167 # bit dodgy, then tell them how to install it. If they can do that 168 # and get all the files in place, then we let them proceed. 169 if ($collectcfg->{'phind'}) { 170 171 print $out "Phind - *experimental* Greenstone verion.\n"; 172 print $out "Checking the phind phrase browser requirements...\n"; 173 174 # Make sure we're not in windows 175 die "Phind currently only works under Unix" unless ($ENV{'GSDLOS'} !~ /windows/i); 176 177 # Ensure the Phind generate scripts are in place 178 my $file1 = &util::filename_cat($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "suffix"); 179 my $file2 = &util::filename_cat($ENV{'GSDLHOME'}, "bin", "script", "phindgen.pl"); 180 my $file3 = &util::filename_cat($ENV{'GSDLHOME'}, "perllib", "phproc.pm"); 181 my $src = &util::filename_cat($ENV{'GSDLHOME'}, "src", "phind", "generate"); 182 183 if (!((-e $file1) && (-e $file2) && (-e $file3))) { 184 print STDERR "The phind generate scripts are not installed. "; 185 print STDERR "To install them, change to the directory\n"; 186 print STDERR " $src\n"; 187 print STDERR "and type \"make install\".\n\n"; 188 die "\n"; 189 } 190 191 # Ensure the Phind CGI script is in place 192 $file1 = &util::filename_cat($ENV{'GSDLHOME'}, "cgi-bin", "phindcgi"); 193 $src = &util::filename_cat($ENV{'GSDLHOME'}, "src", "phind", "host"); 194 195 if (!(-e $file1)) { 196 print STDERR "The phind CGI program is not installed. "; 197 print STDERR "To install it, change to the directory\n"; 198 print STDERR " $src\n"; 199 print STDERR "and type \"make install\".\n\n"; 200 } 201 202 print $out "All the files appear to be in place.\n\n"; 203 } 204 205 206 # Build the collection in realbuilddir 164 207 &util::mk_all_dir ($realbuilddir); 165 208 … … 208 251 } 209 252 253 254 # Create the phind phrase browser interface 255 if ($collectcfg->{'phind'}) { 256 257 # formulate and execute the phind generate command 258 my $command = &util::filename_cat($ENV{'GSDLHOME'}, "bin", "script", "phindgen.pl"); 259 $command .= " -verbosity $verbosity"; 260 $command .= " -maxdocs $maxdocs" if ($maxdocs && ($maxdocs > 0)); 261 $command .= " $collection"; 262 263 print $out "\nExecuting: $command\n" if $verbosity; 264 my $status = system($command); 265 if ($status != 0) { 266 print STDERR "buildcol.pl - Error executing $command: $!\n"; 267 exit($status); 268 } 269 } 270 210 271 close OUT if $close_out; 272 211 273 } 212 274
Note:
See TracChangeset
for help on using the changeset viewer.