diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-16 19:40:15 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-16 19:40:15 +0200 |
commit | b58cbbf013d913355f8d814ce1144f1b2eea8271 (patch) | |
tree | 75ca92d7c3287d4d57dd737f64e7c930ee148f0f | |
parent | 5795cfaede7a9a4709f7c618323c5ab0084c94fd (diff) | |
download | sbotools2-b58cbbf013d913355f8d814ce1144f1b2eea8271.tar.xz |
Use indent() to indent contents of files
-rwxr-xr-x | sbofind | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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. |