diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-10-18 12:29:19 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-10-18 12:29:19 +0000 |
commit | cd7801efff6b2f334595eb9363a317f1c7fad6d0 (patch) | |
tree | 467b4cb7dc0b126070383da04265858ad7d92859 /draklive | |
parent | 089376cf52cdafde9c394aa59df6abcb2108dfed (diff) | |
download | drakiso-cd7801efff6b2f334595eb9363a317f1c7fad6d0.tar drakiso-cd7801efff6b2f334595eb9363a317f1c7fad6d0.tar.gz drakiso-cd7801efff6b2f334595eb9363a317f1c7fad6d0.tar.bz2 drakiso-cd7801efff6b2f334595eb9363a317f1c7fad6d0.tar.xz drakiso-cd7801efff6b2f334595eb9363a317f1c7fad6d0.zip |
reorganize/reindent for next commit
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 28 |
1 files changed, 16 insertions, 12 deletions
@@ -1195,19 +1195,23 @@ sub record_usb_master { my $list_file = tmpnam(); output_p($list_file, map { ".$_\n" } list_selected_loopbacks($live)); local $/ = "\r"; - run_foreach($live->{update_progress} ? sub { - if (/^\s*(\d+)\s+\d+%\s+/) { - $current_file = $1; + my $r = run_foreach( + $live->{update_progress} ? sub { + if (/^\s*(\d+)\s+\d+%\s+/) { + $current_file = $1; $live->{update_progress}->(undef, $all_files + $current_file, $total); - } - if (/(?:^|\n)\S+/) { - $all_files += $current_file; - $current_file = 0; - } - } : sub {}, - 'rsync', '-vdP', '--inplace', '--files-from=' . $list_file, - $loopbacks_source, $live->{mnt} . $live->{prefix}{media}{loopbacks}) - or die "unable to copy loopback files\n"; + } + if (/(?:^|\n)\S+/) { + $all_files += $current_file; + $current_file = 0; + } + } : sub {}, + 'rsync', '-vdP', '--inplace', '--files-from=' . $list_file, + $loopbacks_source, $live->{mnt} . $live->{prefix}{media}{loopbacks}, + ); + if (!$r) { + die "unable to copy loopback files\n"; + } unlink $list_file; cp_af(glob_(get_builddir($live) . $live->{prefix}{build}{files} . '/*'), $live->{mnt}); |