From b58cbbf013d913355f8d814ce1144f1b2eea8271 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Sat, 16 Apr 2016 19:40:15 +0200 Subject: Use indent() to indent contents of files --- sbofind | 8 ++------ 1 file 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. -- cgit v1.2.3