summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-07-09 13:15:32 +0000
committerdes <des@FreeBSD.org>2004-07-09 13:15:32 +0000
commita4be9872994c1e669281f30738a47764ceb240a6 (patch)
tree68d8ea28cbf9f49d5f935169b8bf84115b247795 /tools
parent8369ef54b00cf95c6bc9535f70c703cbf216a140 (diff)
downloadFreeBSD-src-a4be9872994c1e669281f30738a47764ceb240a6.zip
FreeBSD-src-a4be9872994c1e669281f30738a47764ceb240a6.tar.gz
When cleaning house, don't try to remove what isn't there.
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 686e325..6910f995 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
OpenPOWER on IntegriCloud