aboutsummaryrefslogtreecommitdiff
path: root/sboclean
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-16 17:39:15 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-16 17:39:15 +0200
commit0c9c086c92595f4848686c861863365267498aab (patch)
tree83eca1090fbfe6cbecd083537365c94a9ef08799 /sboclean
parent0a035d36fb6a225640d31162e4b348dacfa93f96 (diff)
downloadsbotools-0c9c086c92595f4848686c861863365267498aab.tar.xz
Change argument checking to use postscript unless
Diffstat (limited to 'sboclean')
-rwxr-xr-xsboclean4
1 files changed, 2 insertions, 2 deletions
diff --git a/sboclean b/sboclean
index 851ab84..2f51f35 100755
--- a/sboclean
+++ b/sboclean
@@ -57,7 +57,7 @@ usage_error("You must specify at least one of -d or -w.") unless
($clean_dist || $clean_work);
sub rm_full {
- @_ == 1 or script_error('rm_full requires an argument.');
+ script_error('rm_full requires an argument.') unless @_ == 1;
my $full = shift;
if ($interactive) {
print "Remove $full? [n] ";
@@ -69,7 +69,7 @@ sub rm_full {
}
sub remove_stuff {
- @_ == 1 or script_error 'remove_stuff requires an argument.';
+ script_error 'remove_stuff requires an argument.' unless @_ == 1;
my $dir = shift;
-d $dir or say 'Nothing to do.' and return 0;
opendir(my $dh, $dir);