From 5a3afc8f659a01ac295e24383ec4ac18e7d58cef Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 4 Dec 2012 13:22:38 +0000 Subject: Allow setting some env variables to define and default to setting PERL_EXTUTILS_AUTOINSTALL and PERL_AUTOINSTALL to --skipdeps --- iurt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'iurt') diff --git a/iurt b/iurt index 28642ba..bedac33 100755 --- a/iurt +++ b/iurt @@ -479,6 +479,10 @@ my %config_usage = ( desc => 'Domain to append to usernames when sending emails', default => 'mageia.org' }, + env => { + desc => 'Environment variables to export', + default => { PERL_EXTUTILS_AUTOINSTALL => "--skipdeps", PERL_AUTOINSTALL => "--skipdeps" } + }, home => { desc => 'Home dir', default => $HOME @@ -565,6 +569,14 @@ if (!$arch_comp{$real_arch}{$run{my_arch}}) { } config_init(\%config_usage, $config, \%run); +if ($config->{env}) { + foreach my $var (keys %{$config->{env}}) { + print "$var\n"; + print $config->{env}->{$var}."\n"; + $ENV{$var} = $config->{env}->{$var}; + } +} + $config->{upload} .= $run{distro}; $config->{upload} =~ s/community//g; if ($run{distro} ne 'cooker') { -- cgit v1.2.1