summaryrefslogtreecommitdiff
path: root/debian/live-build-cron.config
blob: b47922de00bbc6c3efff79f554fc39f9a5f6d749 (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
#!/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
	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}"
fi

db_settitle live-build-cron-images/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_stop

	exit 0
fi

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

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

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

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

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

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

db_stop