diff options
author | J Pipkin <j@dawnrazor.net> | 2013-03-02 02:19:59 -0600 |
---|---|---|
committer | J Pipkin <j@dawnrazor.net> | 2013-03-02 02:19:59 -0600 |
commit | 2483cc672c72ef8182035d65de1593dca8b94267 (patch) | |
tree | 37f23ee1e7579e839d61fc7786986edd5dfbcd3c | |
parent | a703387bceaa58be91ade36f1cf3473cb3939f3e (diff) | |
download | sbotools2-2483cc672c72ef8182035d65de1593dca8b94267.tar.xz |
warn anything TMP is set, not just when TMP == /tmp
-rwxr-xr-x | sboclean | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 { |