From cd7801efff6b2f334595eb9363a317f1c7fad6d0 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 18 Oct 2007 12:29:19 +0000 Subject: reorganize/reindent for next commit --- draklive | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'draklive') diff --git a/draklive b/draklive index b0b986c..e87bbb3 100755 --- a/draklive +++ b/draklive @@ -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}); -- cgit v1.2.1