diff options
author | Arnout Engelen <arnout@bzzt.net> | 2023-05-09 17:17:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 17:17:30 +0200 |
commit | 33afedd1082b799d647abf6a79856b863787e7ca (patch) | |
tree | 843a731615aa7fcd40b507907eab51be65d529d6 /maintainers | |
parent | 5a9628a3a68f21f1290e46e31c3942393d2b5792 (diff) | |
parent | 7cfcfdc4d4feafdf816862a6ae31eb5be6163406 (diff) |
Merge pull request #224690 from raboof/copy-tarballs-fix-debug-mode
copy-tarballs.pl: fix DEBUG mode
Diffstat (limited to 'maintainers')
-rwxr-xr-x | maintainers/scripts/copy-tarballs.pl | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/maintainers/scripts/copy-tarballs.pl b/maintainers/scripts/copy-tarballs.pl index c81b49bfb5993..2f8d250fd5291 100755 --- a/maintainers/scripts/copy-tarballs.pl +++ b/maintainers/scripts/copy-tarballs.pl @@ -50,19 +50,22 @@ while (@ARGV) { } } +my $bucket; -# S3 setup. -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"; +if (not defined $ENV{DEBUG}) { + # S3 setup. + 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( - { aws_access_key_id => $aws_access_key_id, - aws_secret_access_key => $aws_secret_access_key, - retry => 1, - host => "s3-eu-west-1.amazonaws.com", - }); + my $s3 = Net::Amazon::S3->new( + { aws_access_key_id => $aws_access_key_id, + aws_secret_access_key => $aws_secret_access_key, + retry => 1, + 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 $cacheFile = ($ENV{"HOME"} or die "\$HOME is not set") . "/.cache/nix/copy-tarballs"; |