From ff30da3ebb107421372e2a1a6d37f7c189667f2b Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 10 Jan 2018 09:03:20 +0000 Subject: Simplify run_() helper function and minimise direct calls to system(). --- draklive | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'draklive') diff --git a/draklive b/draklive index 046daac..e5cd63d 100755 --- a/draklive +++ b/draklive @@ -54,11 +54,11 @@ sub clean { if (-e $build->get_build_dir) { umount_all_in_root($build->get_build_dir); - system('sudo rm -rf ' . $build->get_build_dir); + run_as_root('rm', '-rf', $build->get_build_dir); } if (-e $build->get_chroot_dir) { umount_all_in_root($build->get_chroot_dir); - system('sudo rm -rf ' . $build->get_chroot_dir); + run_as_root('rm', '-rf', $build->get_chroot_dir); } } -- cgit v1.2.1