diff --git a/script/builder b/script/builder index c1bc0e7..9b8c6c3 100755 --- a/script/builder +++ b/script/builder @@ -27,6 +27,9 @@ if ( @ARGV == 0 ) { $ENV{LC_ALL} = "en_US.UTF-8"; #here be dragons +# A barely print replacement +sub say { print join( "\n", @_ ) . "\n"; } + # Input: package, depth, and atom. Package: sys-fs/foobarfs, Depth: 1 (depth of the package tree) , Atom: 1/0 (enable disable atom output) sub package_deps { my $package = shift; @@ -55,11 +58,11 @@ sub calculate_missing { my $depth = shift; # Getting the package dependencies and the installed packages - say "[$package] Getting the package dependencies and the installed packages" + say "[$package] Getting the package dependencies and the installed packages"; my @Packages = package_deps( $package, $depth, 1 ); my @Installed_Packages = qx/equo q --quiet list installed/; chomp(@Installed_Packages); - say "[$package] Getting the package dependencies and the installed packages" + say "[$package] Getting the package dependencies and the installed packages"; #taking only the 4th column of output as key of the hashmap my %installed_packs = @@ -85,9 +88,6 @@ sub uniq { keys %{ { map { $_ => 1 } @_ } }; } -# A barely print replacement -sub say { print join( "\n", @_ ) . "\n"; } - sub help { say "-> You should feed me with something", "", "Examples:", "", "\t$0 app-text/tree", "\t$0 plasma-meta --layman kde", "", @@ -163,7 +163,7 @@ my @packages = @ARGV; if ($use_equo) { my @packages_deps; foreach my $p (@packages) { - say "[$p] Getting the package dependencies which aren't already installed on the system.. ''" + say "[$p] Getting the package dependencies which aren't already installed on the system.. ''"; push( @packages_deps, calculate_missing( $p , 2) ) if $equo_install_atoms; push( @packages_deps, package_deps( $p, 2, 0 ) )