48 lines
1.1 KiB
Perl
48 lines
1.1 KiB
Perl
#!/usr/bin/perl -w
|
|
|
|
#use diagnostics;
|
|
use strict; # please develop with the strict pragma
|
|
use Install;
|
|
|
|
$::language='en';
|
|
|
|
###############################################
|
|
# SET THE etcdir ENVIRONMENT VAR INSTEAD #
|
|
###############################################
|
|
Install::setetcdir($ENV{etcdir}||'/etc');
|
|
|
|
my $input;
|
|
loadconfigfile();
|
|
|
|
($::kohaversion) || ($::kohaversion='unknown version');
|
|
$::newversion=`cat koha.version`;
|
|
chomp $::newversion;
|
|
if ($::newversion =~ /RC/) {
|
|
releasecandidatewarning();
|
|
}
|
|
|
|
#FIXME: need kohaversion number
|
|
showmessage(getmessage('WelcomeToUpgrader',[$::kohaversion,$::newversion]),'yn');
|
|
|
|
unless ($answer =~/y/i) {
|
|
showmessage(getmessage('AbortingInstall'),'PressEnter');
|
|
exit;
|
|
} else {
|
|
print "Great! continuing upgrade... \n";
|
|
};
|
|
|
|
setkohaversion($::newversion);
|
|
checkperlmodules();
|
|
backupkoha();
|
|
getapacheinfo();
|
|
installfiles();
|
|
# custom templates warning added to installfiles();
|
|
updatedatabase();
|
|
finalizeconfigfile();
|
|
|
|
showmessage(getmessage('UpgradeCompleted'),'PressEnter');
|
|
|
|
my $reply=showmessage('Would you like to complete a survey about your library?', 'yn', 'y');
|
|
if ($reply=~/y/i) {
|
|
system("perl kohareporter");
|
|
}
|