aboutsummaryrefslogtreecommitdiff
path: root/sbofind
diff options
context:
space:
mode:
authorJacob Pipkin <j@dawnrazor.net>2012-10-04 21:19:32 -0500
committerJacob Pipkin <j@dawnrazor.net>2012-10-04 21:19:32 -0500
commitcc976e1f56f1feada2e69a3127fca2c195af1c46 (patch)
tree1b66a1c1e5f7fb045f3f834698147e772900d57a /sbofind
parent55c308767feb1ec95d7588bc5bbe7c3c0803ffbb (diff)
downloadsbotools2-cc976e1f56f1feada2e69a3127fca2c195af1c46.tar.xz
consistency and cleanup fixes
Diffstat (limited to 'sbofind')
-rwxr-xr-xsbofind18
1 files changed, 7 insertions, 11 deletions
diff --git a/sbofind b/sbofind
index d4e2e07..d2c6201 100755
--- a/sbofind
+++ b/sbofind
@@ -6,7 +6,6 @@
# script to locate something in a local SlackBuilds tree.
#
# author: Jacob Pipkin <j@dawnrazor.net>
-# date: Boomtime, the 39th day of Discord in the YOLD 3178
# license: WTFPL <http://sam.zoy.org/wtfpl/COPYING>
use 5.12.3;
@@ -86,7 +85,7 @@ sub get_file_contents ($) {
my $contents = do {local $/; <$fh>};
for ($contents) {
s/\n/\n /g;
- s/ $//g;
+ s/\n $//g;
}
return $contents;
}
@@ -97,17 +96,14 @@ my $findings = perform_search $search;
if (exists $$findings[0]) {
my @listing = ("\n");
for my $hash (@$findings) {
- while (my ($key, $value) = each %$hash) {
- push @listing, "SBo: $key\n";
- push @listing, "Path: $value\n";
- push @listing, "info: ". get_file_contents "$value/$key.info"
- if $show_info;
- push @listing, "README: ". get_file_contents "$value/README"
- if $show_readme;
- push @listing, "\n";
+ while (my ($key, $val) = each %$hash) {
+ say "SBo: $key";
+ say "Path: $val";
+ say "info: ". get_file_contents "$val/$key.info";
+ say "README: ". get_file_contents "$val/README";
+ say '';
}
}
- print $_ for @listing;
} else {
say "Nothing found for search term: $search";
}