From 5ca399e0e9ab12063f15c4ab14443ba762877634 Mon Sep 17 00:00:00 2001 From: Jacob Pipkin Date: Thu, 30 Aug 2012 14:03:49 -0500 Subject: bugfixes++ --- sboclean | 2 +- sboconfig | 2 +- sboupgrade | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sboclean b/sboclean index 3154bd1..fd6f5c8 100755 --- a/sboclean +++ b/sboclean @@ -49,7 +49,7 @@ unless ($clean_dist || $clean_work) { sub remove_stuff ($) { exists $_[0] or script_error 'remove_stuff requires an argument'; - say "Nothing to do." and return 1 unless -d $_[0]; + -d $[0] or say "Nothing to do." and return 1; my $dir = shift; opendir (my $dh, $dir); FIRST: while (my $ls = readdir $dh) { diff --git a/sboconfig b/sboconfig index b5c1d6d..9c2682f 100755 --- a/sboconfig +++ b/sboconfig @@ -101,7 +101,7 @@ sub config_write ($$) { my $has = 0; my $regex = qr/\A\Q$key\E=/; FIRST: for my $tmpline (@temp) { - $has++, $tmpline = "$key=$val", last FIRST if $tmpline =~ $regex;; + $has++, $tmpline = "$key=$val", last FIRST if $tmpline =~ $regex; } untie @temp; # otherwise, append our new $key=$value pair diff --git a/sboupgrade b/sboupgrade index b5208e9..be2fc5a 100755 --- a/sboupgrade +++ b/sboupgrade @@ -63,6 +63,7 @@ if (exists $options{j}) { ($options{j} =~ /^\d+$/ || $options{j} eq 'FALSE'); } my $jobs = exists $options{j} ? $options{j} : $config{JOBS}; +$jobs = 0 if $jobs eq 'FALSE'; show_usage and exit 1 unless exists $ARGV[0]; @@ -89,7 +90,9 @@ sub get_readme_path ($) { sub get_inst_names ($) { exists $_[0] or script_error 'get_inst_names requires an argument.'; my $inst = shift; - return [$$_{name} for @$inst]; + my @installed; + push @installed, $$_{name} for @$inst; + return \@installed; } # pull list of requirements, offer to install them -- cgit v1.2.3