diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-09-30 19:57:45 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-09-30 19:57:45 +0000 |
commit | 7e1173efc5947f5b6dfc0fef66b461e25ba10f91 (patch) | |
tree | 8da6cf8fbc92f481d820eded6aa3bdc38ce9551c | |
parent | c5f32b05fe8b8be31c26d5d6dcc8386aa434ee61 (diff) | |
download | transfugdrake-7e1173efc5947f5b6dfc0fef66b461e25ba10f91.tar transfugdrake-7e1173efc5947f5b6dfc0fef66b461e25ba10f91.tar.gz transfugdrake-7e1173efc5947f5b6dfc0fef66b461e25ba10f91.tar.bz2 transfugdrake-7e1173efc5947f5b6dfc0fef66b461e25ba10f91.tar.xz transfugdrake-7e1173efc5947f5b6dfc0fef66b461e25ba10f91.zip |
move code in a first_step function
-rwxr-xr-x | transfugdrake | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/transfugdrake b/transfugdrake index cb73020..6fa04d0 100755 --- a/transfugdrake +++ b/transfugdrake @@ -65,12 +65,7 @@ my $wiz = wizards->new({ list => \@linux_users, }, ], - post => sub { - @windows_items = transfugdrake::list_windows_items($windows_disk, $windows_user); - @steps = map { $_->[0] } grep { intersection(\@windows_items, $_->[1]) } group_by2(@step_items); - @steps or return 'nothing'; - next_step(); - }, + post => sub { first_step() }, }, files => { name => N("Migrate your Windows documents to your home directory. Documents can be imported by copying them, or they can be shared with the other operating system"), @@ -164,6 +159,12 @@ my $wiz = wizards->new({ $wiz->process($in); +sub first_step() { + @windows_items = transfugdrake::list_windows_items($windows_disk, $windows_user); + @steps = map { $_->[0] } grep { intersection(\@windows_items, $_->[1]) } group_by2(@step_items); + @steps ? next_step() : 'nothing'; +} + sub next_step() { shift(@steps) || 'end' } sub step_import { |