- Timestamp:
- 2016-05-05T18:18:40+12:00 (8 years ago)
- Location:
- main/trunk/greenstone2/bin/script
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/activate.pl
r29983 r30499 594 594 } else { 595 595 $buildtype = "mg"; #mg is the default 596 } 596 } 597 597 598 598 # can't do anything without a build directory with something in it to move into index … … 747 747 } 748 748 749 # Copy just the contents of building dir into the index dir, overwriting 750 # existing files, but don't replace index with building. 751 &print_task_msg("Moving \"building\" -> \"index\""); 752 &FileUtils::moveDirectoryContents($build_dir, $index_dir); 749 if($build_dir eq $index_dir) { # building_dir can have been set to "index" folder, see incremental-buildcol.pl 750 &print_task_msg("building folder is index folder, not moving"); 751 } else { 752 # Copy just the contents of building dir into the index dir, overwriting 753 # existing files, but don't replace index with building. 754 &print_task_msg("Moving \"building\" -> \"index\""); 755 &FileUtils::moveDirectoryContents($build_dir, $index_dir); 756 } 753 757 } 754 758 … … 778 782 # 4. Ping the library URL, and if it's a persistent server and running, activate the collection again 779 783 780 # Check for success: if building does not exist OR is empty 781 if( !&FileUtils::directoryExists($build_dir) || &FileUtils::isDirectoryEmpty($build_dir)) {784 # Check for success: if building does not exist OR is empty OR if building is index (in which case there was no move) 785 if($build_dir eq $index_dir || !&FileUtils::directoryExists($build_dir) || &FileUtils::isDirectoryEmpty($build_dir)) { 782 786 783 787 if(!$skipactivation && $library_url) { # undef if no valid server URL -
main/trunk/greenstone2/bin/script/incremental-rebuild.pl
r26913 r30499 134 134 print STDERR "* Running Buildcol Stage\n"; 135 135 print STDERR "************************\n"; 136 137 136 138 my $buildcol_cmd = $launch_cmd . "incremental-buildcol.pl $quoted_buildcol_argv \"$collect\""; 137 # run incremental buildcol with activate flag 138 my $buildcol_cmd = $launch_cmd . "incremental-buildcol.pl -activate $quoted_buildcol_argv \"$collect\""; 139 139 my $buildcol_status = system($buildcol_cmd)/256; 140 140 if ($buildcol_status != 0) {
Note:
See TracChangeset
for help on using the changeset viewer.