3 # Purpose: build script for creating grml live-cd
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 # Latest change: Tue Feb 13 00:16:11 CET 2007
8 ################################################################################
11 set -e # fail on any error
14 FUNCTIONSFILE='functions.sh' # TODO: fix location
15 for file in $FUNCTIONSFILE /etc/grml/lsb-functions /etc/grml/script-functions ; do
16 [ -r "$file" ] && source "$file" || { print "Reading $file failed. Fatal error, exiting." ; exit 1 }
22 # We need root permissions to execute all the chroot stuff
23 check4root || bailout 1
26 [ -n "$DEBOOTSTRAP" ] || DEBOOTSTRAP='debootstrap'
27 [ -n "$ARCH" ] || ARCH="$(dpkg --print-architecture)"
28 [ -n "$RELEASE" ] || RELEASE='sid'
29 [ -n "$MIRROR" ] || MIRROR='ftp://ftp.tugraz.at/mirror/debian'
30 [ -n "$TARGET" ] || TARGET="$(pwd)/grml-live/chroot/"
32 # cmdline parsing, allow overwriting of variables
35 (-c|--config) CONFIG="${2}"
37 (-r|--root) TARGET="${2}"
39 (-h|--hook) HOOK="${2}"
50 if [ -n "$CONFIG" ] ; then
51 [ -r "$CONFIG" ] || bailout 1 "Sorry, configuration file $CONFIG could not be read. Fatal error, exiting"
52 debug "sourcing $CONFIG"
55 source ../config/grml-live.conf # TODO: fix location
58 # make sure we have some variables, directories,... available before main execution
59 [ -d "$TARGET" ] || mkdir "$TARGET"
60 [ -n "$ARCH" ] && ARCH="$DEB_HOST_ARCH" || bailout 1 "\$ARCH not set, exiting."
63 source 01_bootstrap.sh
66 if [ -n "$HOOK" ] ; then
67 debug "executing given hook $HOOK"
84 ## END OF FILE #################################################################
85 # vim: ai tw=80 ft=zsh expandtab