diff options
author | Jacob Pipkin <j@dawnrazor.net> | 2012-09-01 12:06:19 -0500 |
---|---|---|
committer | Jacob Pipkin <j@dawnrazor.net> | 2012-09-01 12:06:19 -0500 |
commit | eb394521aabc27b9918c84a2fc6eb7571f577510 (patch) | |
tree | 052c0697ea23fe25180fe1b390e003c85cbff199 | |
parent | b182d3c89554828478d8d24fd31a87ba629e75fc (diff) | |
download | sbotools2-eb394521aabc27b9918c84a2fc6eb7571f577510.tar.xz |
almost there.
-rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 2 | ||||
-rwxr-xr-x | sbofind | 8 | ||||
-rwxr-xr-x | sboupgrade | 12 |
3 files changed, 13 insertions, 9 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index 79a2946..c3b86a0 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -680,7 +680,7 @@ sub make_distclean (%) { } my $sbo = get_sbo_from_loc $args{LOCATION}; make_clean $sbo, $args{SRC}, $args{VERSION}; - say "Distcleaning for $sbo-$args{VERSION}..."; + say "Distcleaning for $sbo-$args{VERSION}...\n"; # remove any distfiles for this particular SBo. my %downloads = get_sbo_downloads (LOCATION => $args{LOCATION}); for my $key (keys %downloads) { @@ -77,12 +77,14 @@ sub get_file_contents ($) { -f $_[0] or return "$_[0] doesn't exist.\n"; my $fh = open_read shift; my $contents = do {local $/; <$fh>}; - $contents =~ s/\n/\n /g; - $contents =~ s/ $//g; + for ($contents) { + s/\n/\n /g; + s/ $//g; + } return $contents; } -perform_search $search; +my $findings = perform_search $search; # pretty formatting if (exists $$findings[0]) { @@ -155,7 +155,7 @@ sub get_user_group ($) { # offer to run any user/group add commands sub ask_user_group ($$) { exists $_[1] or script_error 'ask_user_group requires two arguments'; - my ($cmds, $readme) = shift; + my ($cmds, $readme) = @_; say "\n". $readme; print "\nIt looks like this slackbuild requires the following"; say " command(s) to be run first:"; @@ -209,10 +209,11 @@ sub readme_prompt ($$) { close $fh; # check for requirements, offer to install any found my $requires = get_requires $sbo, $location; - ask_requires $requires, $readme, $sbo if ref $requires eq 'ARRAY'; + ask_requires (REQUIRES => $requires, README => $readme, SBO => $sbo) if + ref $requires eq 'ARRAY'; # check for user/group add commands, offer to run any found my $user_group = get_user_group $readme; - ask_user_group $user_group, $readme if ref $user_group eq 'ARRAY'; + ask_user_group $user_group, $readme if $$user_group[0]; # check for options mentioned in the README my $opts; $opts = ask_opts $readme if get_opts $readme; @@ -244,8 +245,10 @@ sub process_sbos ($) { if ($@) { $failures{$sbo} = $@; } else { + do_upgradepkg $pkg unless $no_install; unless ($distclean eq 'TRUE') { - make_clean $sbo, $src, $version unless $noclean eq 'TRUE'; + make_clean (SBO => $sbo, SRC => $src, VERSION => $version) + unless $noclean eq 'TRUE'; } else { make_distclean ( SBO => $sbo, @@ -254,7 +257,6 @@ sub process_sbos ($) { LOCATION => $locations{$sbo}, ); } - do_upgradepkg $pkg unless $no_install; # move package to $config{PKG_DIR} if defined unless ($config{PKG_DIR} eq 'FALSE') { my $dir = $config{PKG_DIR}; |