summaryrefslogtreecommitdiff
path: root/debian/live-build-cron.config
blob: e720e49a0e8c5169d609574111f9f1026fd82a00 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/bin/sh

set -e

. /usr/share/debconf/confmodule

_FILES="/etc/live/build-cron.conf /etc/live/build-cron.d/*"

for _FILE in "${_FILES}"
do
	if [ -e "${_FILE}" ]
	then
		_DEBCONF="true"

		. "${_FILE}" || true
	fi
done

if [ "${_DEBCONF}" = "true" ]
then
	# live-build-cron-images
	db_set live-build-cron/images-enable "${LIVE_BUILD_CRON_IMAGES}"
	db_set live-build-cron/images-directory "${LIVE_BUILD_CRON_IMAGES_DIRECTORY}"
	db_set live-build-cron/images-build "${LIVE_BUILD_CRON_IMAGES_BUILD}"

	db_set live-build-cron/images-daily-distributions "${LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS}"
	db_set live-build-cron/images-daily-flavours "${LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS}"

	db_set live-build-cron/images-weekly-distributions "${LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS}"
	db_set live-build-cron/images-weekly-flavours "${LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS}"

	db_set live-build-cron/images-monthly-distributions "${LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS}"
	db_set live-build-cron/images-monthly-flavours "${LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS}"

	db_set live-build-cron/images-source "${LIVE_BUILD_CRON_IMAGES_SOURCE}"

	# live-build-cron-manual
	db_set live-build-cron/manual-enable "${LIVE_BUILD_CRON_MANUAL}"
fi

db_settitle live-build-cron/title
db_input high live-build-cron/images-enable || true
db_go

db_get live-build-cron/images-enable
LIVE_BUILD_CRON_IMAGES="${RET}"

if [ "${LIVE_BUILD_CRON_IMAGES}" = "true" ]
then
	db_settitle live-build-cron/title
	db_input low live-build-cron/images-directory || true
	db_go

	db_settitle live-build-cron/title
	db_input low live-build-cron/images-build || true
	db_go

	for _BUILDS in daily weekly monthly
	do
		db_settitle live-build-cron/title
		db_input low live-build-cron/images-${_BUILDS}-distributions || true
		db_go

		db_settitle live-build-cron/title
		db_input low live-build-cron/images-${_BUILDS}-flavours || true
		db_go
	done

	db_settitle live-build-cron/title
	db_input low live-build-cron/images-source || true
	db_go

	db_settitle live-build-cron/title
	db_input low live-build-cron/images-cron || true
	db_go
fi

db_settitle live-build-cron/title
db_input high live-build-cron/manual-enable || true
db_go

db_get live-build-cron/manual-enable
LIVE_BUILD_CRON_MANUAL="${RET}"

if [ "${LIVE_BUILD_CRON_MANUAL}" = "true" ]
then
	db_settitle live-build-cron/title
	db_input low live-build-cron/manual-username || true
	db_go

	db_settitle live-build-cron/title
	db_input low live-build-cron/manual-directory || true
	db_go

	db_settitle live-build-cron/title
	db_input low live-build-cron/manual-cron || true
	db_go
fi

db_stop