Changeset 19743
- Timestamp:
- 2009-06-05T10:51:46+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/bin/script/incremental-buildcol.pl
r19620 r19743 39 39 40 40 use strict; 41 no strict 'refs'; # allow filehandles to be variables and vice versa 42 no strict 'subs'; # allow barewords (eg STDERR) as function arguments 41 43 42 44 use util; 43 45 use colcfg; 44 46 45 47 sub main … … 61 63 my $collect = pop @argv; 62 64 63 64 65 my @filtered_argv = (); 65 66 66 67 my $collect_dir = undef; 67 68 my $build_dir = undef; 69 my $site = undef; 68 70 69 71 while (my $arg = shift @argv) { … … 75 77 $build_dir = shift @argv; 76 78 push(@filtered_argv,$arg,$build_dir); 79 } 80 elsif ($arg eq "-site") { 81 $site = shift @argv; 82 push(@filtered_argv,$arg,$site); 77 83 } 78 84 else { … … 114 120 115 121 if (-e $build_cfg_filename) { 116 $buildcol_cmd .= " -incremental"; 122 123 # figure out if there has been a change of indexer 124 # (e.g. collect.cfg now says lucene, but build.cfg says mgpp) 125 126 if ((&colcfg::use_collection($site, $collect, $collect_dir)) eq "") { 127 print STDERR "Unable to use collection \"$collect\" within \"$collect_dir\"\n"; 128 exit -1; 129 } 130 # Read in the collection configuration file. 131 my ($collect_cfg_filename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR); 132 my $collectcfg = &colcfg::read_collection_cfg ($collect_cfg_filename,$gs_mode); 133 134 my $buildcfg = &colcfg::read_build_cfg ($build_cfg_filename); 135 136 if ($buildcfg->{'buildtype'} ne $collectcfg->{'buildtype'}) { 137 print STDERR "*****\n"; 138 print STDERR "* Change of indexer detected. Switching to full buildcol.pl.\n"; 139 print STDERR "*****\n"; 140 $buildcol_cmd .= " -removeold"; 141 } 142 else { 143 144 $buildcol_cmd .= " -incremental"; 145 } 117 146 } 118 147 else { 119 ### print STDERR "$build_cfg_filename does not exist.\n"; 148 # build.cfg doesn't exit 120 149 print STDERR "*****\n"; 121 150 print STDERR "* First time built. Switching to full buildcol.pl.\n";
Note:
See TracChangeset
for help on using the changeset viewer.