Bug 18050: DBRev 20.06.00.055
[koha.git] / debian / scripts / koha-upgrade-to-3.4
blob190d841f54b511472b3a149bc803c54a305b0569
1 #!/bin/sh
3 # koha-upgrade-to-3.4 - performs the necessary changes to upgrade a Koha
4 # system from 3.2 to 3.4
6 # Copyright 2011 Catalyst IT, Ltd
7 #
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 TO_UPGRADE=$@
23 if [ -z "$TO_UPGRADE" ] ;
24 then
25 TO_UPGRADE=`koha-list`
28 if [ -z "$TO_UPGRADE" ] ;
29 then
30 echo "No Koha instances were found to upgrade."
31 exit
34 cat <<EOH
35 Koha will be upgraded for the following instances: $TO_UPGRADE
37 This may take some time to run. Go make a coffee.
38 EOH
40 for name in $TO_UPGRADE
42 echo "Upgrading $name..."
43 sudo -u "$name-koha" -H \
44 env PERL5LIB=/usr/share/koha/lib \
45 KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
46 /usr/share/koha/bin/maintenance/remove_items_from_biblioitems.pl --run
47 echo "Rebuilding zebra for $name..."
48 koha-rebuild-zebra --full -v -u $name
49 done