aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2004-07-09 13:15:32 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2004-07-09 13:15:32 +0000
commitbce92f41d6049f19dde0a6bf4cc6342361a407e7 (patch)
tree68d8ea28cbf9f49d5f935169b8bf84115b247795 /tools
parent9f5965dded19a3abd200b120d781247d98427456 (diff)
Notes
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/tinderbox/tinderbox.pl20
1 files changed, 13 insertions, 7 deletions
diff --git a/tools/tools/tinderbox/tinderbox.pl b/tools/tools/tinderbox/tinderbox.pl
index 686e325bedf46..6910f99509b00 100644
--- a/tools/tools/tinderbox/tinderbox.pl
+++ b/tools/tools/tinderbox/tinderbox.pl
@@ -415,13 +415,19 @@ MAIN:{
# Clean up remains from old runs
if ($cmds{'clean'}) {
logstage("cleaning the sandbox");
- remove_dir("$sandbox/src")
- or error("unable to remove old source directory");
- remove_dir("$sandbox/obj")
- or error("unable to remove old object directory");
- spawn('/bin/chflags', '-R', '0', "$sandbox/root");
- remove_dir("$sandbox/root")
- or error("unable to remove old chroot directory");
+ if (-e "$sandbox/src") {
+ remove_dir("$sandbox/src")
+ or error("unable to remove old source directory");
+ }
+ if (-e "$sandbox/obj") {
+ remove_dir("$sandbox/obj")
+ or error("unable to remove old object directory");
+ }
+ if (-e "$sandbox/root") {
+ spawn('/bin/chflags', '-R', '0', "$sandbox/root");
+ remove_dir("$sandbox/root")
+ or error("unable to remove old chroot directory");
+ }
}
# Check out new source tree