From 0ebb0ac94bf1f8049fb8369f1b831b8a1552c856 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 May 2012 18:26:57 +0000 Subject: (init_env_share) split it out of main() --- perl-install/install/install2.pm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'perl-install') 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; -- cgit v1.2.1