diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-19 23:05:35 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-19 23:05:35 +0000 |
commit | 18e7e576943e3f0ff7a5b1c094de27a5e9c5a334 (patch) | |
tree | 14a201b523b5fcdb29d7121e533714f9c7773221 | |
parent | 2c1805a3ed18ffc39059f3ba6b391b417b80b5ac (diff) | |
download | draklive-install-18e7e576943e3f0ff7a5b1c094de27a5e9c5a334.tar draklive-install-18e7e576943e3f0ff7a5b1c094de27a5e9c5a334.tar.gz draklive-install-18e7e576943e3f0ff7a5b1c094de27a5e9c5a334.tar.bz2 draklive-install-18e7e576943e3f0ff7a5b1c094de27a5e9c5a334.tar.xz draklive-install-18e7e576943e3f0ff7a5b1c094de27a5e9c5a334.zip |
factorize copy source in a variable
-rwxr-xr-x | draklive-install | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/draklive-install b/draklive-install index 835cb6a..996b8e6 100755 --- a/draklive-install +++ b/draklive-install @@ -105,9 +105,11 @@ fs::any::prepare_minimal_root($all_hds); run_program::run('makedev', $::prefix . '/dev'); undef $wait; +my $copy_source = '/'; + #- copy to disk $wait = $in->wait_message('', N("Computing total size")); -my $total = first(split(/\s+/, `du -sbx / 2>/dev/null`)); +my $total = first(split(/\s+/, `du -sbx $copy_source 2>/dev/null`)); undef $wait; sub build_copy_command { @@ -120,7 +122,7 @@ sub build_copy_command { } ($wait, my $update_progress) = copying_message_with_progress_bar($in, N("Copying in progress")); -open(my $OUTPUT, '-|', build_copy_command('/', $::prefix)); +open(my $OUTPUT, '-|', build_copy_command($copy_source, $::prefix)); { local $_; my $current = my $previous = 0; |