From 2483cc672c72ef8182035d65de1593dca8b94267 Mon Sep 17 00:00:00 2001 From: J Pipkin Date: Sat, 2 Mar 2013 02:19:59 -0600 Subject: warn anything TMP is set, not just when TMP == /tmp --- sboclean | 7 ++++--- 1 file 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 =~ /^[yY\n]/; } else { -- cgit v1.2.3