From 47c2a429b14494ba6e869f39f87a5be9e3ddf6fd Mon Sep 17 00:00:00 2001 From: tonnesen Date: Tue, 9 Jul 2002 20:16:41 +0000 Subject: [PATCH] Added warnings if the version to be installed has 'RC' in ther version. --- installer.pl | 33 +++++++++++++++++++++++++++++++++ koha.upgrade | 31 +++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/installer.pl b/installer.pl index 088361c3b8..e3b001d4ce 100644 --- a/installer.pl +++ b/installer.pl @@ -15,6 +15,39 @@ unless ($< == 0) { my $kohaversion=`cat koha.version`; chomp $kohaversion; + +if ($kohaversion =~ /RC/) { + print qq| +===================== += RELEASE CANDIDATE = +===================== + +WARNING WARNING WARNING WARNING WARNING + +You are about to install Koha version $kohaversion. This version of Koha is a +release candidate. It is not intended to be installed on production systems. +It is being released so that users can test it before we release a final +version. + +|; + print "Are you sure you want to install Koha $kohaversion? (Y/[N]): "; + + my $answer = ; + chomp $answer; + + if ($answer eq "Y" || $answer eq "y") { + print "Great! continuing setup... \n"; + } else { + print qq| + +Watch for announcements of Koha releases on the Koha mailing list or the Koha +web site (http://www.koha.org/). + +|; + exit; + }; +} + if (-e "/etc/koha.conf") { my $installedversion=`grep kohaversion= /etc/koha.conf`; chomp $installedversion; diff --git a/koha.upgrade b/koha.upgrade index 12176250fa..ff1061da9a 100644 --- a/koha.upgrade +++ b/koha.upgrade @@ -42,6 +42,37 @@ my $pass=$configfile{'pass'}; ($kohaversion) || ($kohaversion='unknown version'); my $newversion=`cat koha.version`; chomp $newversion; +if ($newversion =~ /RC/) { + print qq| +===================== += RELEASE CANDIDATE = +===================== + +WARNING WARNING WARNING WARNING WARNING + +You are about to install Koha version $newversion. This version of Koha is a +release candidate. It is not intended to be installed on production systems. +It is being released so that users can test it before we release a final +version. + +|; + print "Are you sure you want to install Koha $newversion? (Y/[N]): "; + + my $answer = ; + chomp $answer; + + if ($answer eq "Y" || $answer eq "y") { + print "Great! continuing setup... \n"; + } else { + print qq| + +Watch for announcements of Koha releases on the Koha mailing list or the Koha +web site (http://www.koha.org/). + +|; + exit; + }; +} print qq| -- 2.39.5