Ignore:
Timestamp:
2009-02-12T13:31:40+13:00 (15 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.

File:
1 edited

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    }
Note: See TracChangeset for help on using the changeset viewer.