diff options
Diffstat (limited to 'debian/live-build-cron.config')
-rw-r--r-- | debian/live-build-cron.config | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/debian/live-build-cron.config b/debian/live-build-cron.config new file mode 100644 index 000000000..b47922de0 --- /dev/null +++ b/debian/live-build-cron.config @@ -0,0 +1,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 |