summaryrefslogtreecommitdiff
path: root/examples/cron
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cron')
-rwxr-xr-xexamples/cron/images.sh16
1 files 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