Recommend relative paths for English template location, to make PO files
[koha.git] / misc / koha.upgrade
1 #!/usr/bin/perl -w
2
3 #use diagnostics;
4 use strict; # please develop with the strict pragma
5 use Install;
6
7 Install::setlanguage('en');
8
9 ###############################################
10 # SET  THE  etcdir  ENVIRONMENT  VAR  INSTEAD #
11 ###############################################
12 Install::setetcdir($ENV{etcdir}||'/etc');
13
14 my $input;
15 loadconfigfile();
16
17 my $kohaversion=`cat koha.version`;
18 chomp $kohaversion;
19 Install::setkohaversion $kohaversion;
20
21
22 if ($kohaversion =~ /RC/) {
23     releasecandidatewarning();
24 }
25
26 my $answer = showmessage(getmessage('WelcomeToUpgrader',[$kohaversion,$::newversion]),'yn');
27
28 unless ($answer =~/y/i) {
29         showmessage(getmessage('AbortingInstall'),'none');
30         exit;
31 } else {
32         print "Great! continuing upgrade... \n";
33 };
34
35 Install::setkohaversion($::newversion);
36 checkperlmodules();
37 backupkoha();
38 getapacheinfo();
39 installfiles();
40 # custom templates warning added to installfiles();
41 updatedatabase();
42 finalizeconfigfile();
43
44 showmessage(getmessage('UpgradeCompleted',['FIXME','FIXME','FIXME','FIXME','FIXME','FIXME']),'PressEnter');
45
46 # my $reply=showmessage('Would you like to complete a survey about your library? [Y]/N: ', 'yn', 'y');
47 # if ($reply=~/y/i) {
48 #     system("perl kohareporter");
49 # }