diff options
author | Yves Duret <yduret@mandriva.com> | 2001-03-22 15:26:30 +0000 |
---|---|---|
committer | Yves Duret <yduret@mandriva.com> | 2001-03-22 15:26:30 +0000 |
commit | 747164a5dee114b0ef0f027e6ef3ecdc6671d297 (patch) | |
tree | 7f0f900edf3f3efe4f4c9eed344467023761e54f /perl-install/bootlook.pm | |
parent | d6bec3867691ef49416b84ee3ec4daf78bdb855f (diff) | |
download | drakx-backup-do-not-use-747164a5dee114b0ef0f027e6ef3ecdc6671d297.tar drakx-backup-do-not-use-747164a5dee114b0ef0f027e6ef3ecdc6671d297.tar.gz drakx-backup-do-not-use-747164a5dee114b0ef0f027e6ef3ecdc6671d297.tar.bz2 drakx-backup-do-not-use-747164a5dee114b0ef0f027e6ef3ecdc6671d297.tar.xz drakx-backup-do-not-use-747164a5dee114b0ef0f027e6ef3ecdc6671d297.zip |
added mapn fun to reduce code.. testing it
Diffstat (limited to 'perl-install/bootlook.pm')
-rw-r--r-- | perl-install/bootlook.pm | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm index 7929c4144..1a6b8e0c9 100644 --- a/perl-install/bootlook.pm +++ b/perl-install/bootlook.pm @@ -292,23 +292,32 @@ sub updateInit # aurora functions #------------------------------------------------------------- + + sub updateAurora { if ($a_mode) { - if ($a_h_button->get_active()) { - symlinkf("/lib/aurora/Monitors/NewStyle-WsLib", "/etc/aurora/Monitor"); - $in->standalone::pkgs_install(qw(Aurora-Monitor-NewStyle-WsLib)) if !(-e "/lib/aurora/Monitors/NewStyle-WsLib"); + mapn { if (_$_[0]->get_active()) { + symlinkf("/lib/aurora/Monitors/$_[1]", "/etc/aurora/Monitor"); + $in->standalone::pkgs_install($_[2]) if !(-e "/lib/aurora/Monitors/$_[1]"); } + }, + (["$a_h_button","NewStyle-WsLib",qw(Aurora-Monitor-NewStyle-WsLib)], + ["$a_v_button","Traditional-WsLib", qw(Aurora-Monitor-Traditional-WsLib)], + ["$a_g_button","Traditional-Gtk+", qw(Aurora-Monitor-Traditional-Gtk+)]); - if ($a_v_button->get_active()) { - symlinkf("/lib/aurora/Monitors/Traditional-WsLib", "/etc/aurora/Monitor"); - $in->standalone::pkgs_install(qw(Aurora-Monitor-Traditional-WsLib)) if !(-e "/lib/aurora/Monitors/Traditional-WsLib"); - } - - if ($a_g_button->get_active()) { - symlinkf("/lib/aurora/Monitors/Traditional-Gtk+", "/etc/aurora/Monitor"); - $in->standalone::pkgs_install(qw(Aurora-Monitor-Traditional-Gtk+)) if !(-e "/lib/aurora/Monitors/Traditional-Gtk+"); - } +# if ($a_h_button->get_active()) { +# symlinkf("/lib/aurora/Monitors/NewStyle-WsLib", "/etc/aurora/Monitor"); +# $in->standalone::pkgs_install(qw(Aurora-Monitor-NewStyle-WsLib)) if !(-e "/lib/aurora/Monitors/NewStyle-WsLib"); +# } +# if ($a_v_button->get_active()) { +# symlinkf("/lib/aurora/Monitors/Traditional-WsLib", "/etc/aurora/Monitor"); +# $in->standalone::pkgs_install(qw(Aurora-Monitor-Traditional-WsLib)) if !(-e "/lib/aurora/Monitors/Traditional-WsLib"); +# } +# if ($a_g_button->get_active()) { +# symlinkf("/lib/aurora/Monitors/Traditional-Gtk+", "/etc/aurora/Monitor"); +# $in->standalone::pkgs_install(qw(Aurora-Monitor-Traditional-Gtk+)) if !(-e "/lib/aurora/Monitors/Traditional-Gtk+"); +# } } else { unlink "/etc/aurora/Monitor"; } |