summaryrefslogtreecommitdiffstats
path: root/bin/live-build.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-01-01 22:34:34 +0100
committerHolger Levsen <holger@layer-acht.org>2015-01-01 22:34:34 +0100
commit068835add9ae309a665115ae3a160209838426df (patch)
treedd933fbecfebafeb4d4f6c730cbccec3f740d621 /bin/live-build.sh
parent36eee5d89da4172a9db96cdfa50686bc334bb51e (diff)
downloadjenkins.debian.net-068835add9ae309a665115ae3a160209838426df.tar.xz
live: cleanup code and cleanup properly
Diffstat (limited to 'bin/live-build.sh')
-rwxr-xr-xbin/live-build.sh17
1 files changed, 10 insertions, 7 deletions
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