commit 697b0377a39d3a8769d2639ffc9b89c67f37323d
parent 0d54187c08404c73f8b9a2d229b7766c7253ab97
Author: Jacob Pipkin <d4wnr4z0r@yahoo.com>
Date: Sat, 26 May 2012 10:33:34 -0500
fix bug where only first line of README was being output
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sboupgrade b/sboupgrade
@@ -87,9 +87,10 @@ sub readme_prompt {
script_error ('readme_prompt requires an argument.') unless exists $_[0];
my $sbo = shift;
my $readme_path = get_readme_path ($sbo);
- open my $readme, '<', $readme_path;
- print "\n". <$readme>;
- close ($readme);
+ open my $readme_file, '<', $readme_path;
+ my $readme = do {local $/; <$readme_file>};
+ print "\n". $readme;
+ close ($readme_file);
print "\nProceed with $sbo? [yn]: ";
my $test = <STDIN>;
exit (0) unless $test =~ /^[Yy]/;