Changeset 18510 for gsdl

Show
Ignore:
Timestamp:
12.02.2009 13:31:40 (11 years ago)
Author:
davidb
Message:

Corrected mistake where collectdir was treated as the the full pathname to the named collection, rather than (as it should be) pointing to one folder higher than that.

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

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/full-rebuild.pl

    r18470 r18510  
    6161    my $collect = pop @argv; 
    6262 
    63     my $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect",$collect); 
    64     if (!-d $collect_dir) { 
     63 
     64    my @filtered_argv = (); 
     65 
     66    my $collect_dir = undef; 
     67    my $build_dir  = undef; 
     68 
     69    while (my $arg = shift @argv) { 
     70    if ($arg eq "-collectdir") { 
     71        $collect_dir = shift @argv; 
     72        push(@filtered_argv,$arg,$collect_dir); 
     73    } 
     74    elsif ($arg eq "-builddir") { 
     75        $build_dir = shift @argv; 
     76        push(@filtered_argv,$arg,$build_dir); 
     77    } 
     78    else { 
     79        push(@filtered_argv,$arg); 
     80    } 
     81    } 
     82 
     83 
     84    if (!defined $collect_dir) { 
     85    $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect"); 
     86    } 
     87    my $this_collect_dir = &util::filename_cat($collect_dir,$collect); 
     88 
     89    if (!-d $this_collect_dir) { 
    6590    print STDERR "Error: $collect_dir does not exist\n"; 
    6691    exit(-1); 
    6792    } 
    6893 
     94 
     95    if (!defined $build_dir) { 
     96    $build_dir = &util::filename_cat($this_collect_dir,"building"); 
     97    push(@filtered_argv,"-builddir",$build_dir); 
     98    } 
    6999 
    70100     
     
    91121    my $buildcol_status = system($buildcol_cmd)/256; 
    92122    if ($buildcol_status == 0) { 
    93         my $building_dir = &util::filename_cat($collect_dir,"building"); 
    94123        my $index_dir = &util::filename_cat($collect_dir,"index"); 
    95124 
     
    106135        print "************************\n"; 
    107136 
    108         &util::mv($building_dir,$index_dir); 
     137        &util::mv($build_dir,$index_dir); 
    109138 
    110139    } 
  • gsdl/trunk/bin/script/incremental-buildcol.pl

    r18492 r18510  
    8383 
    8484    if (!defined $collect_dir) { 
    85     $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect",$collect); 
     85    $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect"); 
    8686    } 
    87     if (!-d $collect_dir) { 
     87    my $this_collect_dir = &util::filename_cat($collect_dir,$collect); 
     88 
     89    if (!-d $this_collect_dir) { 
    8890    print STDERR "Error: $collect_dir does not exist\n"; 
    8991    exit(-1); 
     
    9294 
    9395    if (!defined $build_dir) { 
    94     $build_dir = &util::filename_cat($collect_dir,"index"); 
     96    $build_dir = &util::filename_cat($this_collect_dir,"index"); 
    9597    push(@filtered_argv,"-builddir",$build_dir); 
    9698    } 
  • gsdl/trunk/bin/script/incremental-import.pl

    r18492 r18510  
    8585    } 
    8686 
     87    if (!defined $collect_dir) { 
     88    $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect"); 
     89    } 
     90    my $this_collect_dir = &util::filename_cat($collect_dir,$collect); 
    8791 
    88     if (!defined $collect_dir) { 
    89     $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect",$collect); 
    90     } 
    91     if (!-d $collect_dir) { 
    92     print STDERR "Error: $collect_dir does not exist\n"; 
     92    if (!-d $this_collect_dir) { 
     93    print STDERR "Error: $this_collect_dir does not exist\n"; 
    9394    exit(-1); 
    9495    } 
     
    9697 
    9798    if (!defined $archive_dir) { 
    98     $archive_dir = &util::filename_cat($collect_dir,"archives"); 
     99    $archive_dir = &util::filename_cat($this_collect_dir,"archives"); 
    99100    } 
    100101     
  • gsdl/trunk/bin/script/incremental-rebuild.pl

    r18470 r18510  
    6161    my $collect = pop @argv; 
    6262 
    63     my $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect",$collect); 
    64     if (!-d $collect_dir) { 
    65     print STDERR "Error: $collect_dir does not exist\n"; 
    66     exit(-1); 
    67     } 
    68  
    69  
    70      
    7163    my $quoted_argv = join(" ", map { "\"$_\"" } @argv); 
    7264