Handle undefined previous version when installing.
authorThomas Hochstein <thh@inter.net>
Wed, 12 Jan 2011 15:39:10 +0000 (16:39 +0100)
committerThomas Hochstein <thh@inter.net>
Sun, 11 Aug 2013 20:05:25 +0000 (22:05 +0200)
$OptUpdate is undefined when not upgrading, so don't
prepare an upgrade notice to avoid calling an
undefined variable.

Signed-off-by: Thomas Hochstein <thh@inter.net>
install/install.pl

index 61e8ef1..8ab7798 100755 (executable)
@@ -134,7 +134,9 @@ Enjoy!
 -thh <thh\@inter.net>
 INSTALL
 
-my $Upgrade = <<UPGRADE;
+my $Upgrade ='';
+if ($OptUpdate) {
+ $Upgrade = <<UPGRADE;
 ----------
 Your installation was upgraded from $OptUpdate to $PackageVersion.
 
@@ -144,6 +146,7 @@ Don't forget to restart your INN feed so that it can pick up the new version:
 
 (or whatever you called your feed).
 UPGRADE
+}
 
 ##### --------------------------- End of definitions ---------------------------
 
This page took 0.010327 seconds and 4 git commands to generate.