Changeset 36535 for main/trunk


Ignore:
Timestamp:
2022-08-30T10:52:51+12:00 (20 months ago)
Author:
kjdon
Message:

updating this to use 7Zip, as system tar and release-kits gnu tar didn't work properly on new windows build machine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gs-release-builder/upload-to-www-internal-windows.pl

    r36336 r36535  
    1 #!/usr/bin/perl -w
     1#!C:\greenstone\gs-release-builder\packages\strawberry-perl-5.18\perl\bin\perl.exe -w
    22
    33use strict;
    44use File::Copy;
    55
    6 my $tar = "\"C:\\greenstone\\gs-release-builder\\release-kits\\bin\\tar.exe\"";
     6# The following is GNU tar, and I found on the windows machine build machine it wasn't preserving capitalisation
     7#my $tar = "\"C:\\greenstone\\gs-release-builder\\release-kits\\bin\\tar.exe\" -c ";
     8# the following uses tar from C:\Windows\System32\tar.exe - this tar cannot output to standard out
     9# my $tar = "tar -c ";
     10# the following uses 7Zip and seems to work.
     11# a (create), -ttar (type of archive = tar) -an (disable archive_name field - otherwise it will try to use one of the input files as the field name) -so (output to stdout)
     12my $tar = "\"C:\\Program Files\\7-Zip\\7z\" a -an -ttar -so ";
    713
    814#my $set = `set`;
     
    1218my $keys_dir = "C:\\greenstone\\gs-release-builder\\keys\\";
    1319
    14 my @snap_dirs = ("gs2-caveat", "poo", "gs3-caveat"); # diffcoll?
     20my @snap_dirs = ("gs2-caveat", "gs3-caveat"); # diffcoll?
    1521#my $private_key_file = $keys_dir . "kjdon-linux-labs.ppk";
    16 #die "Couldn't find jumphost key file $private_key_file\n" unless -e $private_key_file;
     22#die "Couldn't find jumphost key file $private_key_file\n" unless -e $private_key_file; - don't need to use the jumphost now
    1723foreach my $dir (@snap_dirs) {
    1824    opendir (DIR, "$main_snapshot_dir$dir") || next;
     
    2733        }
    2834    #   copy ($private_key_file, $new_dir);
    29 #       my $command = "cd  $new_dir && $tar -c rk* Greenstone* | plink -proxycmd \"plink -i kjdon-linux-labs.ppk kjdon\@linux-labs.cms.waikato.ac.nz -nc %host:%port\" -T -i ".$keys_dir."upload-caveat-ed25519.ppk nzdl-gsorg\@www-internal.greenstone.org";
    30         my $command = "cd $new_dir && $tar -c rk* Greenstone* | plink -T -i ".$keys_dir."upload-caveat-ed25519.ppk nzdl-gsorg\@www-internal.greenstone.org";
     35#       my $command = "cd  $new_dir && $tar rk* Greenstone* | plink -proxycmd \"plink -i kjdon-linux-labs.ppk kjdon\@linux-labs.cms.waikato.ac.nz -nc %host:%port\" -T -i ".$keys_dir."upload-caveat-ed25519.ppk nzdl-gsorg\@www-internal.greenstone.org";
     36        my $command = "cd $new_dir && $tar rk* Greenstone* | plink -T -i ".$keys_dir."upload-caveat-ed25519.ppk nzdl-gsorg\@www-internal.greenstone.org";
    3137        print "About to run: $command\n";
    3238        STDOUT->flush();
Note: See TracChangeset for help on using the changeset viewer.