diff options
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -52,13 +52,15 @@ $::verbose = 1; sub clean { my ($build) = @_; - if (-e $build->get_build_dir) { - umount_all_in_root($build->get_build_dir); - run_as_root('rm', '-rf', $build->get_build_dir); + my $build_dir = $build->get_build_dir; + if (-e $build_dir) { + umount_all_in_root($build_dir); + run_as_root('rm', '-rf', $build_dir); } - if (-e $build->get_chroot_dir) { - umount_all_in_root($build->get_chroot_dir); - run_as_root('rm', '-rf', $build->get_chroot_dir); + my $chroot_dir = $build->get_chroot_dir; + if (-e $chroot_dir) { + umount_all_in_root($chroot_dir); + run_as_root('rm', '-rf', $chroot_dir); } } |