Changeset 27724
- Timestamp:
- 2013-06-27T21:29:18+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/diffcol/trunk/task.pl
r27710 r27724 263 263 # imagmagick binary 264 264 print STDERR "Getting imagemagick binary\n"; 265 266 my $os = $isMac ? "darwin" : "linux"; 267 my $imagickzip = "imagemagick-$os"; 265 268 266 269 if($isMac) { 267 $cmd = "svn export http://svn.greenstone.org/main/trunk/binaries/mac/intel/imagemagick bin/darwin/imagemagick"; 268 $status = system($cmd); 270 $imagickzip .= "-10.5.tar.gz"; 271 # &File::Path::make_path($ENV{'DATA_DIR'}."$sep$gsdl$sep$os"); # need to ensure gsdl/bin/darwin exists 272 # the following mac img bin contains binaries that points to libraries containing fixed paths to /home/max 273 # $cmd = "svn export http://svn.greenstone.org/main/trunk/binaries/mac/intel/imagemagick bin/darwin/imagemagick"; 274 # $status = system($cmd); 269 275 } else { # linux 270 276 my $extension64 = ($bit_arch =~ m/64$/) ? "-x64" : ""; 271 my $imagickzip = "imagemagick-linux$extension64.tar.gz"; 272 $cmd = "svn export http://svn.greenstone.org/gs2-extensions/imagemagick/trunk/imagemagick-linux$extension64.tar.gz ext/$imagickzip"; 273 $status = system ($cmd); 274 system("cd ext && tar -xvzf $imagickzip"); 275 276 move("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick/linux", "$ENV{'DATA_DIR'}$sep$gsdl$sep"."bin/linux/imagemagick"); # http://www.perlmonks.org/?node_id=586537 277 unlink "ext/$imagickzip" or warn "Could not unlink ext/$imagickzip: $!"; 278 &File::Path::remove_tree("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick"); # the untarred parent folder 279 } 277 $imagickzip .= "$extension64.tar.gz"; 278 } 279 280 $cmd = "svn export http://svn.greenstone.org/gs2-extensions/imagemagick/trunk/$imagickzip ext/$imagickzip"; 281 $status = system ($cmd); 282 system("cd ext && tar -xvzf $imagickzip"); 280 283 281 284 # gnomelib binary … … 343 346 $cmd .= "\""; # close off cmd to bash and run it 344 347 $status = system $cmd; 348 349 350 # Moving imagemagick after instead of before compilation, since bin/darwin gets overwritten during compilation 351 move("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick/$os", "$ENV{'DATA_DIR'}$sep$gsdl$sep"."bin/$os/imagemagick"); # http://www.perlmonks.org/?node_id=586537 352 unlink "$ENV{'DATA_DIR'}/$gsdl"."/ext/$imagickzip" or warn "Could not unlink ext/$imagickzip: $!"; 353 &File::Path::remove_tree("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick"); # the untarred parent folder 354 345 355 } 346 356 … … 349 359 exit -1; 350 360 } 351 361 352 362 # set the path to the greenstone_home variable 353 363 $greenstone_home="$ENV{'DATA_DIR'}$sep$gsdl"; … … 363 373 print $xml_fh "<test time=\"$dateid\" id=\"$dateid\">\n"; 364 374 365 # make sure that diffcol/model-collect is up to date before copying it over to greenstone-home 375 # make sure that diffcol/model-collect is up to date before copying it over to greenstone-home 376 366 377 print $xml_fh "Updating $ENV{'TASK_HOME'}/model-collect:\n"; 367 378 my $cmd = "svn up $ENV{'TASK_HOME'}/model-collect"; #chdir("$ENV{'TASK_HOME'}/model-collect");
Note:
See TracChangeset
for help on using the changeset viewer.