Changeset 28615 for other-projects/nightly-tasks/diffcol/trunk
- Timestamp:
- 2013-11-12T19:10:18+13:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/diffcol/trunk/task.pl
r28606 r28615 487 487 } 488 488 489 sub getOpenOfficeExt 490 { 491 # current revision is 27763, but using "head" works 492 my $OOEXT_TRAC_URL="http://trac.greenstone.org/export/head/gs2-extensions/open-office/trunk/open-office-java"; # both for .zip and .tar.gz extension 493 #"http://trac.greenstone.org/export/".$ENV{'SVN_OPT_REV'}."/gs2-extensions/open-office/trunk/open-office-java"; 494 495 # now get the OpenOffice extension for the AllDocTypes collection 496 print STDERR "Getting open office ext from $OOEXT_TRAC_URL:\n"; 497 498 chdir($greenstone_home); 499 my $cmd = ""; 500 if ($isWin) { 501 $cmd = "setup.bat && cd ext && wget $OOEXT_TRAC_URL.zip && unzip open-office-java.zip"; 502 503 } elsif ($isMac) { # need to use curl not wget 504 $cmd = "cd ext && curl $OOEXT_TRAC_URL.tar.gz > open-office-java.tar.gz && tar -xzf open-office-java.tar.gz"; 505 } 506 else { # linux 507 $cmd = "bash -c \"export GSDLHOME=&& source setup.bash && cd ext && wget $OOEXT_TRAC_URL.tar.gz && tar -xzf open-office-java.tar.gz\""; 508 } 509 my $status = system $cmd; 510 if($status != 0) { 511 print STDERR "@@@ Failed to set up the Open Office Extension\n"; 512 exit -1; # or proceed to testing other tutorials? 513 } 514 } 515 489 516 sub getIsisGdl { 490 517 my $gsfolder = shift(@_); … … 514 541 if($num_cols == 0) { # deal with all collections 515 542 push (@collections, ""); 516 # putting the empty string in the array so that the "all colle ections" case517 # can be handled similar lto how the case of user-specified collections is handled543 # putting the empty string in the array so that the "all collections" case 544 # can be handled similar to how the case of user-specified collections is handled 518 545 519 546 } else { # deal with user specified set of collections … … 527 554 } 528 555 529 &getIsisGdl("$greenstone_home"); 556 my $openofficeext = &filename_concat($greenstone_home, "ext", "open-office"); 557 if(!-d $openofficeext) { 558 &getOpenOfficeExt(); 559 } 560 561 #&getIsisGdl("$greenstone_home"); 530 562 531 563 open (my $xml_fh, '>'.$xmlout) || die "Could not open xml file $xmlout for appending: $!\n";
Note:
See TracChangeset
for help on using the changeset viewer.