Changeset 27764 for other-projects/nightly-tasks/diffcol/trunk/task.pl
- Timestamp:
- 2013-07-05T18:40:10+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/diffcol/trunk/task.pl
r27743 r27764 30 30 no strict 'subs'; # allow barewords (eg STDERR) as function arguments 31 31 32 32 33 my $isWin = ($^O =~ m/mswin/i) ? 1 : 0; 34 my $isMac = ($^O =~ m/macos|darwin/i) ? 1 : 0; 33 35 my $sep = $isWin ? "\\" : "/"; 34 36 my $pathsep = $isWin ? ";" : ":"; … … 247 249 248 250 ##print STDERR "@@@ OS: $^O.|".$Config{'archname64'}."|\n"; 249 250 251 251 252 if($isWin) { 252 253 print STDERR "Compiling $gsdl using makegs2.bat running in auto (silent) mode\n"; … … 258 259 } else { # if we're on linux/darwin, need gnome-lib for the correct architecture. And need imagemagick to build imgs in collections 259 260 260 my $isMac = ($^O =~ m/macos|darwin/i) ? 1 : 0;261 261 my $bit_arch=`uname -m`; 262 262 … … 359 359 exit -1; 360 360 } 361 361 362 362 # set the path to the greenstone_home variable 363 363 $greenstone_home="$ENV{'DATA_DIR'}$sep$gsdl"; 364 364 365 } 366 367 sub getPDFBox 368 { 369 # current revision is 27763, but using "head" works 370 my $PDFBOX_TRAC_URL="http://trac.greenstone.org/export/head/gs2-extensions/pdf-box/trunk/pdf-box-java"; # both for .zip and .tar.gz extension 371 #"http://trac.greenstone.org/export/".$ENV{'SVN_OPT_REV'}."/gs2-extensions/pdf-box/trunk/pdf-box-java"; 372 373 # now get the PDFBox extension for PDFBox tutorial 374 print STDERR "Getting pdfbox from $PDFBOX_TRAC_URL:\n"; 375 376 chdir($greenstone_home); 377 my $cmd = ""; 378 if ($isWin) { 379 $cmd = "setup.bat && cd ext && wget $PDFBOX_TRAC_URL.zip && unzip pdf-box-java.zip"; 380 381 } elsif ($isMac) { # need to use curl not wget 382 $cmd = "cd ext && curl $PDFBOX_TRAC_URL.tar.gz > pdf-box-java.tar.gz && tar -xzf pdf-box-java.tar.gz"; 383 } 384 else { # linux 385 $cmd = "source setup.bash && cd ext && wget $PDFBOX_TRAC_URL.tar.gz && tar -xzf pdf-box-java.tar.gz"; 386 } 387 my $status = system $cmd; 388 if($status != 0) { 389 print STDERR "@@@ Failed to set up PDFBox\n"; 390 #exit -1; # proceed testing other tutorials? 391 } 365 392 } 366 393 … … 368 395 sub run_test 369 396 { 397 my $pdfbox = &filename_concat($greenstone_home, "ext", "pdf-box"); 398 if(!-d $pdfbox) { 399 &getPDFBox(); 400 } 401 370 402 open (my $xml_fh, '>'.$xmlout) || die "Could not open xml file $xmlout for appending: $!\n"; 371 403
Note:
See TracChangeset
for help on using the changeset viewer.