summaryrefslogtreecommitdiff
path: root/scripts/00-defaults.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:20 +0200
committerDaniel Baumann <daniel@debian.org>2007-09-23 10:04:20 +0200
commiteeaafbe5c0d5f2ffd87bf7d9f12c13df1bd0adf5 (patch)
tree18151396add367542887fe7f017025538e3318d6 /scripts/00-defaults.sh
downloadlive-build-eeaafbe5c0d5f2ffd87bf7d9f12c13df1bd0adf5.zip
live-build-eeaafbe5c0d5f2ffd87bf7d9f12c13df1bd0adf5.tar.gz
Adding live-package 0.99-1.
Diffstat (limited to 'scripts/00-defaults.sh')
-rw-r--r--scripts/00-defaults.sh125
1 files changed, 125 insertions, 0 deletions
diff --git a/scripts/00-defaults.sh b/scripts/00-defaults.sh
new file mode 100644
index 0000000..32e5e13
--- /dev/null
+++ b/scripts/00-defaults.sh
@@ -0,0 +1,125 @@
+# scripts/00-defaults.sh
+
+Defaults ()
+{
+ # Set architecture name
+ if [ -z "${LIVE_ARCHITECTURE}" ]
+ then
+ LIVE_ARCHITECTURE="`dpkg-architecture -qDEB_BUILD_ARCH`"
+ fi
+
+ # Set build directory
+ if [ -z "${LIVE_ROOT}" ]
+ then
+ LIVE_ROOT="`pwd`/live"
+ fi
+
+ # Set rootfs directory
+ if [ -d "${LIVE_ROOTFS}" ]
+ then
+ LIVE_CHROOT="${LIVE_ROOTFS}"
+ else
+ LIVE_CHROOT="${LIVE_ROOT}/chroot"
+ fi
+
+ # Set distribution name
+ if [ -z "${LIVE_DISTRIBUTION}" ]
+ then
+ LIVE_DISTRIBUTION="unstable"
+ fi
+
+ # Set bootstrap flavour
+ if [ -z "${LIVE_FLAVOUR}" ]
+ then
+ LIVE_FLAVOUR="standard"
+ fi
+
+ # Set linux-image flavour
+ if [ -z "${LIVE_LINUX}" ]
+ then
+ case "${LIVE_ARCHITECTURE}" in
+ alpha)
+ LIVE_LINUX="alpha-generic"
+ ;;
+
+ amd64)
+ LIVE_LINUX="amd64-generic"
+ ;;
+
+ arm)
+ echo "E: You need to specify the linux flavour."
+ exit 1
+ ;;
+
+ hppa)
+ LIVE_LINUX="parisc"
+ ;;
+
+ i386)
+ LIVE_LINUX="486"
+ ;;
+
+ ia64)
+ LIVE_LINUX="itanium"
+ ;;
+
+ m68k)
+ echo "E: You need to specify the linux flavour."
+ exit 1
+ ;;
+
+ powerpc)
+ LIVE_LINUX="powerpc"
+ ;;
+
+ s390)
+ LIVE_LINUX="s390"
+ ;;
+
+ sparc)
+ LIVE_LINUX="sparc32"
+ ;;
+
+ *)
+ echo "FIXME: Architecture not yet supported."
+ exit 1
+ ;;
+ esac
+ fi
+
+ # Set logfile
+ if [ -z "${LIVE_LOGFILE}" ]
+ then
+ LIVE_LOGFILE="${LIVE_ROOT}/make-live.log"
+ fi
+
+ # Set mirror server
+ if [ -z "${LIVE_MIRROR}" ]
+ then
+ LIVE_MIRROR="http://ftp.debian.org/debian"
+ fi
+
+ # Set package list
+ if [ -z "${LIVE_PACKAGE_LIST}" ] && [ ! -z "${LIVE_LIST}" ]
+ then
+ LIVE_PACKAGE_LIST="/usr/share/make-live/lists/${LIVE_LIST}"
+ fi
+
+ # Set sections names
+ if [ -z "${LIVE_SECTIONS}" ]
+ then
+ LIVE_SECTIONS="main"
+ fi
+
+ # Set templates directory
+ if [ ! -z "${LIVE_TEMPLATES}" ]
+ then
+ if [ ! -d "${LIVE_TEMPLATES}" ]
+ then
+ echo "E: ${LIVE_TEMPLATES} is not a directory."
+ exit 1
+ fi
+ else
+ LIVE_TEMPLATES="/usr/share/make-live/templates"
+ fi
+}