Merge pull request #224690 from raboof/copy-tarballs-fix-debug-mode
copy-tarballs.pl: fix DEBUG mode
This commit is contained in:
commit
33afedd108
1 changed files with 13 additions and 10 deletions
|
@ -50,19 +50,22 @@ while (@ARGV) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $bucket;
|
||||||
|
|
||||||
# S3 setup.
|
if (not defined $ENV{DEBUG}) {
|
||||||
my $aws_access_key_id = $ENV{'AWS_ACCESS_KEY_ID'} or die "AWS_ACCESS_KEY_ID not set\n";
|
# S3 setup.
|
||||||
my $aws_secret_access_key = $ENV{'AWS_SECRET_ACCESS_KEY'} or die "AWS_SECRET_ACCESS_KEY not set\n";
|
my $aws_access_key_id = $ENV{'AWS_ACCESS_KEY_ID'} or die "AWS_ACCESS_KEY_ID not set\n";
|
||||||
|
my $aws_secret_access_key = $ENV{'AWS_SECRET_ACCESS_KEY'} or die "AWS_SECRET_ACCESS_KEY not set\n";
|
||||||
|
|
||||||
my $s3 = Net::Amazon::S3->new(
|
my $s3 = Net::Amazon::S3->new(
|
||||||
{ aws_access_key_id => $aws_access_key_id,
|
{ aws_access_key_id => $aws_access_key_id,
|
||||||
aws_secret_access_key => $aws_secret_access_key,
|
aws_secret_access_key => $aws_secret_access_key,
|
||||||
retry => 1,
|
retry => 1,
|
||||||
host => "s3-eu-west-1.amazonaws.com",
|
host => "s3-eu-west-1.amazonaws.com",
|
||||||
});
|
});
|
||||||
|
|
||||||
my $bucket = $s3->bucket("nixpkgs-tarballs") or die;
|
$bucket = $s3->bucket("nixpkgs-tarballs") or die;
|
||||||
|
}
|
||||||
|
|
||||||
my $doWrite = 0;
|
my $doWrite = 0;
|
||||||
my $cacheFile = ($ENV{"HOME"} or die "\$HOME is not set") . "/.cache/nix/copy-tarballs";
|
my $cacheFile = ($ENV{"HOME"} or die "\$HOME is not set") . "/.cache/nix/copy-tarballs";
|
||||||
|
|
Loading…
Reference in a new issue