File: plan.config

package info (click to toggle)
plan 1.8.7-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,196 kB
  • ctags: 1,971
  • sloc: ansic: 24,392; perl: 1,361; sh: 1,030; makefile: 514; yacc: 120; sed: 17
file content (33 lines) | stat: -rw-r--r-- 952 bytes parent folder | download | duplicates (5)
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
#!/bin/sh -e
# Gopal Narayanan <gopal@debian.org>

. /usr/share/debconf/confmodule

# Find the current setting.  This might be used later, if I implement
# support for reconfiguring the package using debconf.

# Do this in a subshell to be able to cd into the example directory
(
    if [ -f /etc/plan/holiday ] ; then
	cd /usr/share/doc/plan/examples/holiday
	for h in *; do 
	    # Use cpp and remove # lines inserted by cpp to handle both
	    # old style copying and new style #include in /etc/plan/holiday.
	    if cpp /etc/plan/holiday | grep -v '^#' | cmp -s - $h; then
		current=`echo $h | sed s/holiday_//`
		echo "Current is $current" 1>&2
	    fi
	done
    fi
    if [ -z "$current" ] ; then
	current=none
    fi
    db_set plan/holiday "$current"
)

# Do not touch the existing config file, to avoid problems with local
# modifications of the file.
if [ ! -f /etc/plan/holiday ] ; then
    db_input medium plan/holiday || true
    db_go
fi