Changeset 15003
- Timestamp:
- 2008-02-22T11:29:52+13:00 (16 years ago)
- Location:
- gsdl/trunk/perllib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/basebuilder.pm
r14934 r15003 322 322 my $dbext = ".bdb"; 323 323 $dbext = ".ldb" if &util::is_little_endian(); 324 my $fulldbname = &util::filename_cat ($textdir, "$self->{'collection'}$dbext"); 324 my $dbname = &util::get_dirsep_tail($self->{'collection'}).$dbext; 325 my $fulldbname = &util::filename_cat ($textdir, $dbname); 325 326 $fulldbname =~ s/\//\\/g if ($ENV{'GSDLOS'} =~ /^windows$/i); 326 327 … … 430 431 $build_cfg->{'builddate'} = time; 431 432 $build_cfg->{'buildtype'} = $self->{'buildtype'}; 432 $build_cfg->{'indexstem'} = $self->{'collection'};433 $build_cfg->{'indexstem'} = &util::get_dirsep_tail($self->{'collection'}); 433 434 $build_cfg->{'stemindexes'} = $self->{'stemindexes'}; 434 435 -
gsdl/trunk/perllib/lucenebuilder.pm
r13590 r15003 367 367 my $dbext = ".bdb"; 368 368 $dbext = ".ldb" if &util::is_little_endian(); 369 my $infodb_file = &util::filename_cat($self->{'build_dir'}, "text", $self->{'collection'} . $dbext); 369 370 my $collect_tail = &util::get_dirsep_tail($self->{'collection'}); 371 my $infodb_file = &util::filename_cat($self->{'build_dir'}, "text", $collect_tail . $dbext); 370 372 371 373 # If we aren't doing an incremental addition, then we just call the super- -
gsdl/trunk/perllib/mgbuilder.pm
r12971 r15003 127 127 128 128 &util::mk_all_dir (&util::filename_cat($self->{'build_dir'}, "text")); 129 my $basefilename = "text/$self->{'collection'}"; 129 130 my $collect_tail = &util::get_dirsep_tail($self->{'collection'}); 131 my $basefilename = &util::filename_cat("text",$collect_tail); 130 132 my $fulltextprefix = &util::filename_cat ($self->{'build_dir'}, $basefilename); 131 133 … … 315 317 my $indexdir = $self->{'index_mapping'}->{$index}; 316 318 &util::mk_all_dir (&util::filename_cat($self->{'build_dir'}, $indexdir)); 319 320 my $collect_tail = &util::get_dirsep_tail($self->{'collection'}); 317 321 my $fullindexprefix = &util::filename_cat ($self->{'build_dir'}, $indexdir, 318 $ self->{'collection'});322 $collect_tail); 319 323 my $fulltextprefix = &util::filename_cat ($self->{'build_dir'}, "text", 320 $ self->{'collection'});324 $collect_tail); 321 325 322 326 # get any os specific stuff … … 522 526 my $exe = &util::get_os_exe (); 523 527 my $mgstat_exe = &util::filename_cat($exedir, "mgstat$exe"); 524 my $input_file = &util::filename_cat ("text", $self->{'collection'}); 528 529 my $collect_tail = &util::get_dirsep_tail($self->{'collection'}); 530 my $input_file = &util::filename_cat ("text", $collect_tail); 525 531 if (!-e "$mgstat_exe" || !open (PIPEIN, "mgstat$exe -d \"$self->{'build_dir'}\" -f \"$input_file\" |")) { 526 532 print $outhandle "Warning: Couldn't open pipe to $mgstat_exe to get additional stats\n"; -
gsdl/trunk/perllib/mgppbuilder.pm
r14934 r15003 201 201 &util::mk_all_dir (&util::filename_cat($self->{'build_dir'}, "text")); 202 202 203 my $basefilename = "text/$self->{'collection'}"; 203 my $collect_tail = &util::get_dirsep_tail($self->{'collection'}); 204 my $basefilename = &util::filename_cat("text",$collect_tail); 204 205 my $fulltextprefix = &util::filename_cat ($self->{'build_dir'}, $basefilename); 205 206 206 my $osextra = "";207 my $osextra = ""; 207 208 if ($ENV{'GSDLOS'} =~ /^windows$/i) { 208 209 $fulltextprefix =~ s@/@\\@g; … … 402 403 my $indexdir = $self->{'index_mapping'}->{$index}; 403 404 &util::mk_all_dir (&util::filename_cat($self->{'build_dir'}, $indexdir)); 405 406 my $collect_tail = &util::get_dirsep_tail($self->{'collection'}); 404 407 my $fullindexprefix = &util::filename_cat ($self->{'build_dir'}, 405 408 $indexdir, 406 $ self->{'collection'});409 $collect_tail); 407 410 my $fulltextprefix = &util::filename_cat ($self->{'build_dir'}, "text", 408 $ self->{'collection'});411 $collect_tail); 409 412 410 413 # get any os specific stuff -
gsdl/trunk/perllib/util.pm
r14926 r15003 703 703 704 704 705 sub get_dirsep_tail { 706 my ($filename) = @_; 707 708 # returns last part of directory or filename 709 # On unix e.g. a/b.d => b.d 710 # a/b/c => c 711 712 my $dirsep = get_dirsep(); 713 714 my ($tail) = ($filename =~ m/^(?:.*?$dirsep)?(.*?)$/); 715 716 return $tail; 717 } 718 719 705 720 # if this is running on windows we want binaries to end in 706 721 # .exe, otherwise they don't have to end in any extension
Note:
See TracChangeset
for help on using the changeset viewer.