summaryrefslogtreecommitdiffstats
path: root/draklive
diff options
context:
space:
mode:
Diffstat (limited to 'draklive')
-rwxr-xr-xdraklive14
1 files changed, 8 insertions, 6 deletions
diff --git a/draklive b/draklive
index 4ce7b74..84cb044 100755
--- a/draklive
+++ b/draklive
@@ -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);
}
}