summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2005-04-30 18:22:12 +0000
committerdes <des@FreeBSD.org>2005-04-30 18:22:12 +0000
commitca277419a268814d1d03ffef18ffd4f1a908d2e5 (patch)
tree03c0810b416a2c45b4b6c019d2cb23df7e1a4489 /tools
parentc34b0ce9c8ff3134fffb97d50b83c7090cc85dc8 (diff)
downloadFreeBSD-src-ca277419a268814d1d03ffef18ffd4f1a908d2e5.zip
FreeBSD-src-ca277419a268814d1d03ffef18ffd4f1a908d2e5.tar.gz
Split the 'clean' command into 'cleansrc', 'cleanobj' and 'cleanroot'.
Specifying 'clean' is equivalent to specifying all three.
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/tinderbox/tinderbox.pl13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/tools/tinderbox/tinderbox.pl b/tools/tools/tinderbox/tinderbox.pl
index cf972ba..4d84ed4 100644
--- a/tools/tools/tinderbox/tinderbox.pl
+++ b/tools/tools/tinderbox/tinderbox.pl
@@ -59,6 +59,9 @@ my %userenv;
my %cmds = (
'clean' => 0,
+ 'cleansrc' => 0,
+ 'cleanobj' => 0,
+ 'cleanroot' => 0,
'update' => 0,
'patch' => 0,
'world' => 0,
@@ -413,16 +416,22 @@ MAIN:{
print($lockfile "$$\n");
# Clean up remains from old runs
- if ($cmds{'clean'}) {
- logstage("cleaning the sandbox");
+ if ($cmds{'clean'} || $cmds{'cleansrc'}) {
+ logstage("cleaning the source tree");
if (-e "$sandbox/src") {
remove_dir("$sandbox/src")
or error("unable to remove old source directory");
}
+ }
+ if ($cmds{'clean'} || $cmds{'cleanobj'}) {
+ logstage("cleaning the object tree");
if (-e "$sandbox/obj") {
remove_dir("$sandbox/obj")
or error("unable to remove old object directory");
}
+ }
+ if ($cmds{'clean'} || $cmds{'cleanroot'}) {
+ logstage("cleaning the chroot tree");
if (-e "$sandbox/root") {
spawn('/bin/chflags', '-R', '0', "$sandbox/root");
remove_dir("$sandbox/root")
OpenPOWER on IntegriCloud