File: scuttle.config

package info (click to toggle)
scuttle 0.7.4-8.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,520 kB
  • ctags: 1,956
  • sloc: php: 8,036; sh: 134; makefile: 48; sql: 43
file content (36 lines) | stat: -rw-r--r-- 722 bytes parent folder | download | duplicates (3)
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 $@