From bdd7b9754fd011ac3a47d8e8d1d5fc6048c46db2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 22 Apr 2008 18:19:19 +0200 Subject: Taking config variables for images.sh from environment. --- examples/cron/images.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/cron/images.sh b/examples/cron/images.sh index ad5cf74..89af7da 100755 --- a/examples/cron/images.sh +++ b/examples/cron/images.sh @@ -1,15 +1,19 @@ -#!/bin/sh -x +#!/bin/sh -e -set -e +# Static variables +DISTRIBUTIONS="${DISTRIBUTIONS:-etch lenny sid}" +FLAVOURS="${FLAVOURS:-standard gnome-desktop kde-desktop xfce-desktop}" +SOURCE="${SOURCE:-enabled}" +# Dynamic variables ARCHITECTURE="$(dpkg --print-architecture)" DATE="$(date +%Y%m%d)" -for DISTRIBUTION in etch lenny sid +for DISTRIBUTION in ${DISTRIBUTIONS} do rm -rf cache/stages* - for FLAVOUR in standard gnome-desktop kde-desktop xfce-desktop + for FLAVOUR in ${FLAVOURS} do mkdir -p config @@ -22,7 +26,7 @@ do rm -rf cache/packages* rm -rf cache/stages_rootfs - if [ "${1}" != "nosource" ] + if [ "${SOURCE}" = "enabled" ] then lh config -d ${DISTRIBUTION} -p ${FLAVOUR} --cache-stages "bootstrap rootfs" --apt-recommends disabled --source enabled --mirror-bootstrap http://mirror/ftp.debian.org/debian/ --mirror-chroot http://mirror/ftp.debian.org/debian/ --mirror-chroot-security http://mirror/ftp.debian.org/debian-security/ else @@ -45,7 +49,7 @@ do mv binary.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.list mv binary.packages debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.packages - if [ "${1}" != "nosource" ] + if [ "${SOURCE}" = "enabled" ] then mv source.tar.gz debian-live-${DISTRIBUTION}-source-${FLAVOUR}.tar.gz mv source.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.tar.gz.list -- cgit v1.0