diff options
| author | Jacob Pipkin <d4wnr4z0r@yahoo.com> | 2012-05-09 13:08:42 -0500 |
|---|---|---|
| committer | Jacob Pipkin <d4wnr4z0r@yahoo.com> | 2012-05-09 13:08:42 -0500 |
| commit | 4c0be3f2cf5c9ef61bc66baafb1630d04f1c44e7 (patch) | |
| tree | 8c4ae73c45d7c2d297bb9e84ce21f813f035a7e0 /sboupgrade | |
| parent | 373ec26a8141e284388d761b218e4b64f4ce1305 (diff) | |
| download | sbotools2-4c0be3f2cf5c9ef61bc66baafb1630d04f1c44e7.tar.xz | |
fix bug where distclean'ing doesn't work, plus other cleanups
Diffstat (limited to 'sboupgrade')
| -rwxr-xr-x | sboupgrade | 39 |
1 files changed, 20 insertions, 19 deletions
@@ -142,7 +142,7 @@ sub print_failures { if (exists $failed[0]) { print "Failures:\n"; print " $_\n" for (@failed); - exit (1); + exit 1; } } @@ -177,25 +177,26 @@ unless ($only_new eq 'TRUE') { print_failures () unless $install_new eq 'TRUE'; } -my @todo_install; -my $has = 'FALSE'; -for (@ARGV) { - SECOND: for my $index (keys @installed) { - if ($_ eq $installed[$index]{name}) { - $has = 'TRUE'; - last SECOND; +if ($install_new eq 'TRUE') { + my @todo_install; + my $has = 'FALSE'; + for (@ARGV) { + SECOND: for my $index (keys @installed) { + if ($_ eq $installed[$index]{name}) { + $has = 'TRUE'; + last SECOND; + } } + unless ($has eq 'TRUE') { + push (@todo_install,$_); + } else { + print "$_ already installed.\n"; + } + $has = 'FALSE'; } - unless ($has eq 'TRUE') { - push (@todo_install,$_); - } else { - print "$_ already installed.\n"; - } - $has = 'FALSE'; -} -@failed = process_sbos (@todo_install) if exists $todo_install[0]; - -print_failures (); + @failed = process_sbos (@todo_install) if exists $todo_install[0]; + print_failures (); +} -exit (0); +exit 0; |
