source: main/trunk/gs-release-builder/upload-to-www-internal-windows.pl@ 36336

Last change on this file since 36336 was 36336, checked in by kjdon, 21 months ago

some files for windows release building

File size: 1.5 KB
Line 
1#!/usr/bin/perl -w
2
3use strict;
4use File::Copy;
5
6my $tar = "\"C:\\greenstone\\gs-release-builder\\release-kits\\bin\\tar.exe\"";
7
8#my $set = `set`;
9#print $set;
10#print "\n";
11my $main_snapshot_dir = "C:\\greenstone\\gs-release-builder\\snapshots\\";
12my $keys_dir = "C:\\greenstone\\gs-release-builder\\keys\\";
13
14my @snap_dirs = ("gs2-caveat", "poo", "gs3-caveat"); # diffcoll?
15#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;
17foreach my $dir (@snap_dirs) {
18 opendir (DIR, "$main_snapshot_dir$dir") || next;
19 print "Attempting to upload snapshots and logs for $dir\n";
20 my @contents = readdir(DIR); close DIR;
21 foreach my $from (@contents) {
22 if ($from =~ /^from/) { # look for the 'from-2022-03-23'
23 my $new_dir = "$main_snapshot_dir$dir\\$from\\uploads";
24 if (!-d $new_dir) {
25 print "directory $new_dir doesn't exist, skipping\n";
26 next;
27 }
28 # 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";
31 print "About to run: $command\n";
32 STDOUT->flush();
33 system($command);
34 }
35 }
36}
37print "finished\n";
Note: See TracBrowser for help on using the repository browser.