diff options
| author | Jacob Pipkin <j@dawnrazor.net> | 2012-08-30 14:02:58 -0500 | 
|---|---|---|
| committer | Jacob Pipkin <j@dawnrazor.net> | 2012-08-30 14:02:58 -0500 | 
| commit | 834e3d2778e81a9b6ffa5a8bc2ad76fb93c91719 (patch) | |
| tree | 6aa11c55a006a1cecd5747b6b1cbf91b77e5a5a8 /sboupgrade | |
| parent | 6d3b46ea4ad9b0a0ed4e9307f88ae3f5a1131894 (diff) | |
| download | sbotools2-834e3d2778e81a9b6ffa5a8bc2ad76fb93c91719.tar.xz | |
bugfixes++
Diffstat (limited to 'sboupgrade')
| -rwxr-xr-x | sboupgrade | 21 | 
1 files changed, 12 insertions, 9 deletions
| @@ -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;  }  # this subroutine may be getting a little out of hand. @@ -204,7 +207,7 @@ sub grok_options ($) {  }  # prompt for the readme, and grok the readme at this time also. -sub readme_prompt ($$) { +sub readme_prompt ($) {  	exists $_[0] or script_error 'readme_prompt requires an argument.';  	my $sbo = shift;  	my $fh = open_read (get_readme_path $sbo); @@ -214,7 +217,7 @@ sub readme_prompt ($$) {  	grok_requirements $sbo, $readme;   	grok_user_group $readme;  	my $opts = grok_options $readme; -	print "\n". $readme unless $opts +	print "\n". $readme unless $opts;  	# present the name as -compat32 if appropriate  	my $name = $compat32 ? "$sbo-compat32" : $sbo;  	print "\nProceed with $name? [y]: "; @@ -294,16 +297,16 @@ my $todo_upgrade;  # but without force, we only want to update what there are updates for  unless ($force) {  	for my $sbo (@ARGV) { -		push @todo_upgrade, $sbo if $sbo ~~ @updates; +		push @$todo_upgrade, $sbo if $sbo ~~ @updates;  	}  } else { -	my @inst = get_installed_sbos; +	my $inst = get_installed_sbos;  	my $inst_names = get_inst_names $inst;  	FIRST: for my $sbo (@ARGV) { -		push $todo_upgrade, $sbo if $sbo ~~ @$inst_names; +		push @$todo_upgrade, $sbo if $sbo ~~ @$inst_names;  	}  } -my @failures = process_sbos $todo_upgrade if exists $todo_upgrade[0]; +my @failures = process_sbos $todo_upgrade if exists $$todo_upgrade[0];  print_failures @failures;  INSTALL_NEW: @@ -329,9 +332,9 @@ FIRST: for my $sbo (@ARGV) {  			}  		}  	} -	push $todo_install, $sbo; +	push @$todo_install, $sbo;  } -@failures = process_sbos $todo_install if exists $todo_install[0]; +@failures = process_sbos $todo_install if exists $$todo_install[0];  print_failures @failures;  exit 0; | 
