diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-07-31 15:56:01 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-07-31 15:56:01 +0000 |
commit | b7ea2e6e02d95e3131744c4c4f7602741e54a70a (patch) | |
tree | ccfca6e6af6ed6674461f78560c53b96bc48a9d0 | |
parent | 44feb7965cb4fdfbb1478e446041fb1a2c27b063 (diff) | |
download | transfugdrake-b7ea2e6e02d95e3131744c4c4f7602741e54a70a.tar transfugdrake-b7ea2e6e02d95e3131744c4c4f7602741e54a70a.tar.gz transfugdrake-b7ea2e6e02d95e3131744c4c4f7602741e54a70a.tar.bz2 transfugdrake-b7ea2e6e02d95e3131744c4c4f7602741e54a70a.tar.xz transfugdrake-b7ea2e6e02d95e3131744c4c4f7602741e54a70a.zip |
select steps according to detected Windows items
-rwxr-xr-x | transfugdrake | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/transfugdrake b/transfugdrake index 7cb7896..170fdf1 100755 --- a/transfugdrake +++ b/transfugdrake @@ -23,6 +23,15 @@ my $bookmarks_migration_type; my $mail_migration_type; my $background_migration_type; +my @step_items = ( + "files", [ "My Documents", "My Music", "My Pictures" ], + "bookmarks", [ "Internet Explorer", "Mozilla Firefox" ], + "mail", [ "Outlook Express" ], + "background", [ "Wallpaper" ], +); +my @steps; +sub next_step { shift(@steps) || 'end' } + my $in = 'interactive'->vnew('su'); my $wiz = wizards->new({ name => N("Migration wizard"), @@ -54,7 +63,9 @@ my $wiz = wizards->new({ ], post => sub { @windows_items = list_windows_items($windows_disk, $windows_user); - 'files'; + @steps = map { $_->[0] } grep { intersection(\@windows_items, $_->[1]) } group_by2(@step_items); + @steps or return 'nothing'; + next_step(); }, }, files => { @@ -72,7 +83,7 @@ my $wiz = wizards->new({ ], post => sub { import_files(); - 'bookmarks'; + next_step(); }, }, bookmarks => { @@ -91,7 +102,7 @@ my $wiz = wizards->new({ ], post => sub { import_bookmarks(); - 'mail'; + next_step(); }, }, mail => { @@ -109,7 +120,7 @@ my $wiz = wizards->new({ ], post => sub { import_mail(); - 'background'; + next_step(); }, }, background => { @@ -125,7 +136,7 @@ my $wiz = wizards->new({ ], post => sub { import_background(); - 'end'; + next_step(); }, }, end => { @@ -136,6 +147,10 @@ my $wiz = wizards->new({ name => N("No Windows installation has been detected."), end => 1, }, + nothing => { + name => N("No documents and settings have been detected."), + end => 1, + }, }, }); |