Bug 11848: Move language detection function in C4::Languages
[koha.git] / debian / koha-common.config
blob3f97df9b4f80b45b8778ee214905a3e9ba9bbb05
1 #!/bin/sh
3 # koha-common.config - ensures that debconf stuff is all handled properly
5 # Copyright 2011 Catalyst IT, Ltd
6 #
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 set -e
22 . /usr/share/debconf/confmodule
24 CONFIGFILE=/etc/koha/koha-common.conf
26 if [ -e $CONFIGFILE ]; then
27 . $CONFIGFILE || true
28 # Put the current values into debconf
29 UPDATE="true"
30 if [ "$AUTOMATIC_TRANSLATIONS_UPDATE" = "no" ] ; then
31 UPDATE="false"
33 db_set koha-common/automatically-update-translations "$UPDATE"
34 else
35 # True is the default
36 db_set koha-common/automatically-update-translations true
39 if dpkg --compare-versions "$2" lt-nl 3.4 ; then
40 db_input high koha-common/3.2-3.4-upgrade-notice || true
43 db_input medium koha-common/automatically-update-translations || true
45 db_go || true