From 72e37ce8c8f65d1340356ffb24581857be3ebb09 Mon Sep 17 00:00:00 2001 From: Jacob Pipkin Date: Fri, 1 Jun 2012 13:36:46 -0500 Subject: bug fixes to make sboclean work --- sboclean | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sboclean') diff --git a/sboclean b/sboclean index 987e142..ba710c3 100755 --- a/sboclean +++ b/sboclean @@ -10,7 +10,7 @@ use SBO::Lib; use File::Basename; use Getopt::Std; -use File::Path qr(remove_tree); +use File::Path qw(remove_tree); use strict; use warnings FATAL => 'all'; @@ -51,14 +51,15 @@ sub remove_stuff { my $dir = shift; opendir (my $dh, $dir); FIRST: while (my $ls = readdir $dh) { - next if /^\.[\.]{0,1}$/; + next if $ls =~ /^\.[\.]{0,1}$/; + my $full = "$dir/$ls"; if ($interactive eq 'TRUE') { - print "Remove $ls? [yn] "; + print "Remove $full? [yn] "; my $test = ; next FIRST unless $test =~ /^[Yy]/; } - unlink $ls if -f $ls; - remove_tree $ls if -d $ls; + unlink $full if -f $full; + remove_tree $full if -d $full; } } -- cgit v1.2.3