aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsboclean7
1 files changed, 4 insertions, 3 deletions
diff --git a/sboclean b/sboclean
index 61c47fc..4a2c131 100755
--- a/sboclean
+++ b/sboclean
@@ -89,9 +89,10 @@ sub clean_c32() {
remove_stuff $config{SBO_HOME} .'/distfiles' if $clean_dist;
if ($clean_work) {
- my $tsbo = $SBO::Lib::env_tmp ? $SBO::Lib::env_tmp : "$SBO::Lib::tmpd/SBo";
- if ($tsbo =~ qr#^/tmp(|/)$# && !$interactive) {
- warn "This will remove the entire contents of /tmp\n";
+ my $env_tmp = $SBO::Lib::env_tmp;
+ my $tsbo = $env_tmp ? $env_tmp : "$SBO::Lib::tmpd/SBo";
+ if ($env_tmp && !$interactive) {
+ warn "This will remove the entire contents of $env_tmp\n";
print "Proceed? [y] ";
remove_stuff $tsbo if <STDIN> =~ /^[yY\n]/;
} else {