From 068835add9ae309a665115ae3a160209838426df Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 1 Jan 2015 22:34:34 +0100 Subject: live: cleanup code and cleanup properly --- bin/live-build.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'bin/live-build.sh') diff --git a/bin/live-build.sh b/bin/live-build.sh index 86135829..337185e8 100755 --- a/bin/live-build.sh +++ b/bin/live-build.sh @@ -8,24 +8,27 @@ DEBUG=false common_init "$@" cleanup_all() { - rm -r $TMPDIR + sudo rm -rf --one-file-system $TMPDIR } TMPDIR=$(mktemp --tmpdir=/srv/live-build -d) trap cleanup_all INT TERM EXIT cd $TMPDIR -# build an debian-edu .iso for now... -# $1 is debian-edu + +# $1 is used for the hostname and username # $2 is standalone... -# FIXME: do debian images too -lb config --distribution jessie --bootappend-live "boot=live config hostname=debian-edu username=debian-edu" -echo education-standalone > config/package-lists/live.list.chroot +lb config --distribution jessie --bootappend-live "boot=live config hostname=$1 username=$1" +case "$2" in + standalone) echo education-standalone > config/package-lists/live.list.chroot + ;; + *) ;; +esac lb build ls -la *.iso || true mkdir -p /srv/live-build/results cp *.iso /srv/live-build/results -# FIXME: use subdir there... (shared with downloaded .isos?) +# FIXME: use proper filenames cleanup_all trap - INT TERM EXIT -- cgit v1.2.3-54-g00ecf