aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Pipkin <d4wnr4z0r@yahoo.com>2012-05-26 10:33:34 -0500
committerJacob Pipkin <d4wnr4z0r@yahoo.com>2012-05-26 10:33:34 -0500
commit697b0377a39d3a8769d2639ffc9b89c67f37323d (patch)
tree2445a5324bf2d28e9a0dc742a7f28e2301c5b150
parent0d54187c08404c73f8b9a2d229b7766c7253ab97 (diff)
downloadsbotools2-697b0377a39d3a8769d2639ffc9b89c67f37323d.tar.xz
fix bug where only first line of README was being output
-rwxr-xr-xsboupgrade7
1 files changed, 4 insertions, 3 deletions
diff --git a/sboupgrade b/sboupgrade
index 7f50839..46dd7ef 100755
--- 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]/;