aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-16 19:40:15 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-16 19:40:15 +0200
commitb58cbbf013d913355f8d814ce1144f1b2eea8271 (patch)
tree75ca92d7c3287d4d57dd737f64e7c930ee148f0f
parent5795cfaede7a9a4709f7c618323c5ab0084c94fd (diff)
downloadsbotools2-b58cbbf013d913355f8d814ce1144f1b2eea8271.tar.xz
Use indent() to indent contents of files
-rwxr-xr-xsbofind8
1 files changed, 2 insertions, 6 deletions
diff --git a/sbofind b/sbofind
index ad16f5e..9db47ba 100755
--- a/sbofind
+++ b/sbofind
@@ -13,7 +13,7 @@
use 5.16.0;
use strict;
use warnings FATAL => 'all';
-use SBO::Lib qw/ slackbuilds_or_fetch script_error open_read get_build_queue %config $slackbuilds_txt $repo_path show_version in /;
+use SBO::Lib qw/ slackbuilds_or_fetch script_error open_read get_build_queue %config $slackbuilds_txt $repo_path show_version in indent /;
use File::Basename;
use Getopt::Long qw(:config bundling);
@@ -138,11 +138,7 @@ sub get_file_contents {
return();
}
my $contents = do {local $/; <$fh>};
- for ($contents) {
- s/\n/\n /g;
- s/\n $//g;
- }
- return $contents;
+ return "\n" . indent 6, $contents;
}
# get build queue and return it as a single line.