1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#!/bin/sh
set -e
# Source debconf library.
. /usr/share/debconf/confmodule
# language
CHOICES=""
DIR="/usr/share/scuttle/www/locales/"
if [ -d $DIR ]; then
for LOCALE in $(ls $DIR); do
if [ -d $DIR$LOCALE ]; then
CHOICES="$CHOICES$LOCALE, ";
fi
done
fi
# cut comma and space of the end of string
CHOICES=${CHOICES%, }
db_subst scuttle/locale choices $CHOICES
# LANG is a environment variable
#db_set scuttle/locale $(echo $LANG) || true
db_input medium scuttle/locale || true
db_go || true
# restart webserver
db_input medium scuttle/webserver || true
db_go || true
# dbconfig-common
. /usr/share/dbconfig-common/dpkg/config.mysql
dbc_first_version="0.7.2"
dbc_go scuttle $@
|