Changeset 23183
- Timestamp:
- 2010-10-20T13:30:50+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/cgi-bin/talkback-progressbar.pl
r23177 r23183 10 10 my $gsdl_tmp_dir; 11 11 12 my $debugging_enabled = 1; # if 1, debugging is enabled and deleting files will not happen12 my $debugging_enabled = 0; # if 1, if enabled deleting files will not happen 13 13 14 14 BEGIN { … … 130 130 my $fc_filename = get_file_central_filename(); 131 131 132 132 133 if (open(FCOUT,">$fc_filename")) { 133 134 … … 137 138 138 139 close(FCOUT); 140 141 142 # Ensure it can be edited by owner of Greenstone install (if needed) 143 chmod(0777,$fc_filename); 139 144 } 140 145 else { … … 169 174 # Useful debug to slow down a 'fast' upload 170 175 # Sleep for 10 msecs 171 # 176 #select(undef, undef, undef, 0.01); 172 177 #select(undef, undef, undef, 0.1); 173 178 } … … 243 248 else { 244 249 # Remove the zip file once we have unzipped it, since it is an intermediate file only 250 `chmod -R a+rw $import_dir/HASH*`; 245 251 unlink($zip_filename) unless $debugging_enabled; 246 252 } 247 248 # print STDOUT "Content-type:text/plain\n\n"; 249 # print STDOUT "cmd = $java_command\n"; 250 # print STDOUT "**** $java_output\n"; 251 252 } 253 253 } 254 255 256 sub rebuild_collection 257 { 258 my ($collect) = @_; 259 260 my $bin_script = &util::filename_cat($gsdl_home,"bin","script"); 261 ## my $inc_rebuild_pl = &util::filename_cat($bin_script,"incremental-rebuild.pl"); 262 263 my $rebuild_cmd = "perl -S incremental-rebuild.pl \"$collect\""; 264 265 my $rebuild_output = `$rebuild_cmd 2>&1`; 266 my $rebuild_status = $?; 267 if ($rebuild_status > 0) { 268 my $report = "Perl rebuild failed: $rebuild_cmd\n--\n"; 269 $report .= "$rebuild_output\n"; 270 $report .= "Exit status: " . ($rebuild_status / 256) . "\n"; 271 ## $report .= $gsdl_cgi->check_perl_home(); 272 273 # $report .= "PATH = ". $ENV{'PATH'}. "\n"; 274 275 276 $gsdl_cgi->generate_error($report); 277 } 278 } 254 279 255 280 sub main { … … 295 320 296 321 unzip_archives_doc($gsdl_cgi,$gsdl_home,$collect_home,$collect,$full_filename); 322 rebuild_collection($collect); 297 323 } 298 324
Note:
See TracChangeset
for help on using the changeset viewer.