File: libphone-utils0.config

package info (click to toggle)
libphone-utils 0.1%2Bgit20110523-2.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 316 kB
  • ctags: 104
  • sloc: ansic: 1,031; sh: 85; python: 50; makefile: 45
file content (35 lines) | stat: -rw-r--r-- 1,076 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
#!/bin/sh -e
# config script for libphone-utils
. /usr/share/debconf/confmodule

if [ -s /etc/phone-utils.conf ] ; then
	INTERNATIONAL=$(cat /etc/phone-utils.conf | grep -E "^international_prefix" | head -n 1 | cut -d "=" -f 2)
	NATIONAL=$(cat /etc/phone-utils.conf | grep -E "^national_prefix" | head -n 1 | cut -d "=" -f 2)
	COUNTRY=$(cat /etc/phone-utils.conf | grep country_code | head -n 1 | cut -d "=" -f 2)
	AREA=$(cat /etc/phone-utils.conf | grep area_code | head -n 1 | cut -d "=" -f 2)

	if [ -n "$INTERNATIONAL" ] ; then
		db_set libphone-utils/international_prefix "$INTERNATIONAL"
	fi
	if [ -n "$NATIONAL" ] ; then
		db_set libphone-utils/national_prefix "$NATIONAL"
	fi
	if [ -n "$COUNTRY" ] ; then
		db_set libphone-utils/country_code "$COUNTRY"
	fi
	if [ -n "$AREA" ] ; then
		db_set libphone-utils/area_code "$AREA"
	fi
fi

db_input high libphone-utils/international_prefix || true
db_go

db_input high libphone-utils/national_prefix || true
db_go

db_input high libphone-utils/country_code || true
db_go

db_input high libphone-utils/area_code || true
db_go