diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-05-23 18:26:57 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-05-23 18:26:57 +0000 |
commit | 0ebb0ac94bf1f8049fb8369f1b831b8a1552c856 (patch) | |
tree | 7c4b01ae7fb1763a50ccc240b083fc0ab8f70df8 /perl-install/install | |
parent | fee0ff950c06d7a7e6a92b5ec75f8a0a8503ab74 (diff) | |
download | drakx-0ebb0ac94bf1f8049fb8369f1b831b8a1552c856.tar drakx-0ebb0ac94bf1f8049fb8369f1b831b8a1552c856.tar.gz drakx-0ebb0ac94bf1f8049fb8369f1b831b8a1552c856.tar.bz2 drakx-0ebb0ac94bf1f8049fb8369f1b831b8a1552c856.tar.xz drakx-0ebb0ac94bf1f8049fb8369f1b831b8a1552c856.zip |
(init_env_share) split it out of main()
Diffstat (limited to 'perl-install/install')
-rw-r--r-- | perl-install/install/install2.pm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm index 59e828074..4b8226376 100644 --- a/perl-install/install/install2.pm +++ b/perl-install/install/install2.pm @@ -485,6 +485,15 @@ sub parse_args { ($cfg, $patch); } +sub init_env_share() { + if ($::testing) { + $ENV{SHARE_PATH} ||= "/export/install/stage2/live/usr/share"; + $ENV{SHARE_PATH} = "/usr/share" if !-e $ENV{SHARE_PATH}; + } else { + $ENV{SHARE_PATH} ||= "/usr/share"; + } +} + #-###################################################################################### #- MAIN #-###################################################################################### @@ -501,12 +510,7 @@ sub main { my ($cfg, $patch) = parse_args(@_); - if ($::testing) { - $ENV{SHARE_PATH} ||= "/export/install/stage2/live/usr/share"; - $ENV{SHARE_PATH} = "/usr/share" if !-e $ENV{SHARE_PATH}; - } else { - $ENV{SHARE_PATH} ||= "/usr/share"; - } + init_env_share(); undef $::auto_install if $cfg; |