diff options
author | Daniel Baumann <daniel@debian.org> | 2008-04-22 18:19:19 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:33 +0100 |
commit | bdd7b9754fd011ac3a47d8e8d1d5fc6048c46db2 (patch) | |
tree | 056242130a900e8799df433008a2f599a5654a27 /examples | |
parent | eff5887e920515abad9a75aef340b0d25708a326 (diff) | |
download | vyos-live-build-bdd7b9754fd011ac3a47d8e8d1d5fc6048c46db2.tar.gz vyos-live-build-bdd7b9754fd011ac3a47d8e8d1d5fc6048c46db2.zip |
Taking config variables for images.sh from environment.
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/cron/images.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/examples/cron/images.sh b/examples/cron/images.sh index ad5cf744a..89af7da50 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 |