[Debian-live-changes] r1923 - in dists/trunk/live-helper: functions helpers

daniel at alioth.debian.org daniel at alioth.debian.org
Sat Jun 2 18:03:32 UTC 2007


Author: daniel
Date: 2007-06-02 18:03:32 +0000 (Sat, 02 Jun 2007)
New Revision: 1923

Modified:
   dists/trunk/live-helper/functions/defaults.sh
   dists/trunk/live-helper/helpers/lh_chroot_localization
   dists/trunk/live-helper/helpers/make-live
Log:


Modified: dists/trunk/live-helper/functions/defaults.sh
===================================================================
--- dists/trunk/live-helper/functions/defaults.sh	2007-06-02 17:48:59 UTC (rev 1922)
+++ dists/trunk/live-helper/functions/defaults.sh	2007-06-02 18:03:32 UTC (rev 1923)
@@ -53,10 +53,7 @@
 	fi
 
 	# Setting package manager
-	if [ -z "${LH_APT}" ]
-	then
-		LH_APT="aptitude"
-	fi
+	LH_APT="${LH_APT:-aptitude}"
 
 	# Setting apt ftp proxy
 	if [ -z "${LH_APT_FTPPROXY}" ] && [ -n "${ftp_proxy}" ]
@@ -81,22 +78,13 @@
 	fi
 
 	# Setting apt pdiffs
-	if [ -z "${LH_APT_PDIFFS}" ]
-	then
-		LH_APT_PDIFFS="enabled"
-	fi
+	LH_APT_PDIFFS="${LH_APT_PDIFFS:-enabled}"
 
 	# Setting apt recommends
-	if [ -z "${LH_APT_RECOMMENDS}" ]
-	then
-		LH_APT_RECOMMENDS="enabled"
-	fi
+	LH_APT_RECOMMENDS="${LH_APT_RECOMMENDS:-enabled}"
 
 	# Setting apt secure
-	if [ -z "${LH_APT_SECURE}" ]
-	then
-		LH_APT_SECURE="enabled"
-	fi
+	LH_APT_SECURE="${LH_APT_SECURE:-enabled}"
 
 	# Setting bootstrap program
 	if [ -z "${LH_BOOTSTRAP}" ] || [ ! -x "${LH_BOOTSTRAP}" ]
@@ -131,37 +119,15 @@
 	fi
 
 	# Setting cache option
-	if [ -z "${LH_CACHE_INDICES}" ]
-	then
-		LH_CACHE_INDICES="disabled"
-	fi
+	LH_CACHE_INDICES="${LH_CACHE_INDICES:-disabled}"
+	LH_CACHE_PACKAGES="${LH_CACHE_PACKAGES:-enabled}"
+	LH_CACHE_STAGES="${LH_CACHE_STAGES:-bootstrap}"
 
-	if [ -z "${LH_CACHE_PACKAGES}" ]
-	then
-		LH_CACHE_PACKAGES="enabled"
-	fi
-
-	if [ -z "${LH_CACHE_STAGES}" ]
-	then
-		LH_CACHE_STAGES="bootstrap"
-	fi
-
 	# Setting debconf frontend
-	if [ -z "${LH_DEBCONF_FRONTEND}" ]
-	then
-		LH_DEBCONF_FRONTEND="noninteractive"
-	fi
+	LH_DEBCONF_FRONTEND="${LH_DEBCONF_FRONTEND:-noninteractive}"
+	LH_DEBCONF_NOWARNINGS="${LH_DEBCONF_NOWARNINGS:-yes}"
+	LH_DEBCONF_PRIORITY="${LH_DEBCONF_PRIORITY:-critical}"
 
-	if [ -z "${LH_DEBCONF_NOWARNINGS}" ]
-	then
-		LH_DEBCONF_NOWARNINGS="yes"
-	fi
-
-	if [ -z "${LH_DEBCONF_PRIORITY}" ]
-	then
-		LH_DEBCONF_PRIORITY="critical"
-	fi
-
 	# Setting genisoimage
 	if [ -z "${LH_GENISOIMAGE}" ]
 	then
@@ -210,10 +176,7 @@
 	fi
 
 	# Setting tasksel
-	if [ -z "${LH_TASKSEL}" ]
-	then
-		LH_TASKSEL="aptitude"
-	fi
+	LH_TASKSEL="${LH_TASKSEL:-aptitude}"
 
 	# Setting root directory
 	if [ -z "${LIVE_ROOT}" ]
@@ -242,31 +205,12 @@
 	fi
 
 	# Setting live helper options
-	if [ -z "${LH_BREAKPOINTS}" ]
-	then
-		LH_BREAKPOINTS="disabled"
-	fi
+	LH_BREAKPOINTS="${LH_BREAKPOINTS:-disabled}"
+	LH_DEBUG="${LH_DEBUG:-disabled}"
+	LH_FORCE="${LH_FORCE:-disabled}"
+	LH_QUIET="${LH_QUIET:-disabled}"
+	LH_VERBOSE="${LH_VERBOSE:-disabled}"
 
-	if [ -z "${LH_DEBUG}" ]
-	then
-		LH_DEBUG="disabled"
-	fi
-
-	if [ -z "${LH_FORCE}" ]
-	then
-		LH_FORCE="disabled"
-	fi
-
-	if [ -z "${LH_QUIET}" ]
-	then
-		LH_QUIET="disabled"
-	fi
-
-	if [ -z "${LH_VERBOSE}" ]
-	then
-		LH_VERBOSE="disabled"
-	fi
-
 	## config/bootstrap
 
 	# Setting architecture value
@@ -285,10 +229,7 @@
 	# LIVE_BOOTSTRAP_CONFIG
 
 	# Setting flavour value
-	if [ -z "${LIVE_BOOTSTRAP_FLAVOUR}" ]
-	then
-			LIVE_BOOTSTRAP_FLAVOUR="standard"
-	fi
+	LIVE_BOOTSTRAP_FLAVOUR="${LIVE_BOOTSTRAP_FLAVOUR:-standard}"
 
 	# Setting boostrap keyring
 	# LIVE_BOOTSTRAP_KEYRING
@@ -366,18 +307,12 @@
 	## config/chroot
 
 	# Setting chroot filesystem
-	if [ -z "${LIVE_CHROOT_FILESYSTEM}" ]
-	then
-		LIVE_CHROOT_FILESYSTEM="squashfs"
-	fi
+	LIVE_CHROOT_FILESYSTEM="${LIVE_CHROOT_FILESYSTEM:-squashfs}"
 
 	# LIVE_HOOKS
 
 	# Setting interactive shell/X11/Xnest
-	if [ -z "${LIVE_INTERACTIVE}" ]
-	then
-		LIVE_INTERACTIVE="disabled"
-	fi
+	LIVE_INTERACTIVE="${LIVE_INTERACTIVE:-disabled}"
 
 	# Setting keyring packages
 	# LIVE_KEYRING_PACKAGES
@@ -485,10 +420,7 @@
 	# LIVE_PACKAGES
 
 	# Setting packages list string
-	if [ -z "${LIVE_PACKAGES_LISTS}" ]
-	then
-		LIVE_PACKAGES_LISTS="standard"
-	fi
+	LIVE_PACKAGES_LISTS="${LIVE_PACKAGES_LISTS:-standard}"
 
 	# Setting tasks string
 	for LIST in ${LIVE_PACKAGES_LISTS}
@@ -522,36 +454,21 @@
 	# LIVE_TASKS
 
 	# Setting security updates option
-	if [ -z "${LIVE_SECURITY}" ]
-	then
-		LIVE_SECURITY="enabled"
-	fi
+	LIVE_SECURITY="${LIVE_SECURITY:-enabled}"
 
 	# Setting symlink convertion option
-	if [ -z "${LIVE_SYMLINKS}" ]
-	then
-		LIVE_SYMLINKS="disabled"
-	fi
+	LIVE_SYMLINKS="${LIVE_SYMLINKS:-disabled}"
 
 	# Setting sysvinit option
-	if [ -z "${LIVE_SYSVINIT}" ]
-	then
-		LIVE_SYSVINIT="disabled"
-	fi
+	LIVE_SYSVINIT="${LIVE_SYSVINIT:-disabled}"
 
 	## config/binary
 
 	# Setting image type
-	if [ -z "${LIVE_BINARY_IMAGES}" ]
-	then
-		LIVE_BINARY_IMAGES="iso"
-	fi
+	LIVE_BINARY_IMAGES="${LIVE_BINARY_IMAGES:-iso}"
 
 	# Setting apt indices
-	if [ -z "${LIVE_BINARY_INDICES}" ]
-	then
-		LIVE_BINARY_INDICES="enabled"
-	fi
+	LIVE_BINARY_INDICES="${LIVE_BINARY_INDICES:-enabled}"
 
 	# Setting boot parameters
 	# LIVE_BOOTAPPEND
@@ -571,10 +488,7 @@
 	fi
 
 	# Setting debian-installer option
-	if [ -z "${LIVE_DEBIAN_INSTALLER}" ]
-	then
-		LIVE_DEBIAN_INSTALLER="disabled"
-	fi
+	LIVE_DEBIAN_INSTALLER="${LIVE_DEBIAN_INSTALLER:-disabled}"
 
 	# Setting encryption
 	# LIVE_ENCRYPTION
@@ -611,16 +525,10 @@
 	fi
 
 	# Set iso preparer
-	if [ -z "${LIVE_ISO_PREPARER}" ]
-	then
-		LIVE_ISO_PREPARER="live-helper \${VERSION}; http://packages.qa.debian.org/live-helper"
-	fi
+	LIVE_ISO_PREPARER="${LIVE_ISO_PREPARER:-live-helper \${VERSION}; http://packages.qa.debian.org/live-helper}"
 
 	# Set iso publisher
-	if [ -z "${LIVE_ISO_PUBLISHER}" ]
-	then
-		LIVE_ISO_PUBLISHER="Debian Live project; http://debian-live.alioth.debian.org/; debian-live-devel at lists.alioth.debian.org"
-	fi
+	LIVE_ISO_PUBLISHER="${LIVE_ISO_PUBLISHER:-Debian Live project; http://debian-live.alioth.debian.org/; debian-live-devel at lists.alioth.debian.org}"
 
 	# Setting iso volume
 	if [ -z "${LIVE_ISO_VOLUME}" ]
@@ -637,10 +545,7 @@
 	fi
 
 	# Setting memtest option
-	if [ -z "${LIVE_MEMTEST}" ]
-	then
-		LIVE_MEMTEST="memtest86+"
-	fi
+	LIVE_MEMTEST="${LIVE_MEMTEST:-memtest86+}"
 
 	# Setting netboot server path
 	if [ -z "${LIVE_NET_PATH}" ]
@@ -657,31 +562,19 @@
 	fi
 
 	# Setting netboot server address
-	if [ -z "${LIVE_NET_SERVER}" ]
-	then
-		LIVE_NET_SERVER="192.168.1.1"
-	fi
+	LIVE_NET_SERVER="${LIVE_NET_SERVER:-192.168.1.1}"
 
 	# Setting syslinux splash
 	# LIVE_SYSLINUX_SPLASH
 
 	# Setting username
-	if [ -z "${LIVE_USERNAME}" ]
-	then
-		LIVE_USERNAME="user"
-	fi
+	LIVE_USERNAME="${LIVE_USERNAME:-user}"
 
 	## config/source
 
 	# Setting source option
-	if [ -z "${LIVE_SOURCE}" ]
-	then
-		LIVE_SOURCE="disabled"
-	fi
+	LIVE_SOURCE="${LIVE_SOURCE:-disabled}"
 
 	# Setting image type
-	if [ -z "${LIVE_SOURCE_IMAGES}" ]
-	then
-		LIVE_SOURCE_IMAGES="generic"
-	fi
+	LIVE_SOURCE_IMAGES="${LIVE_SOURCE_IMAGES:-generic}"
 }

Modified: dists/trunk/live-helper/helpers/lh_chroot_localization
===================================================================
--- dists/trunk/live-helper/helpers/lh_chroot_localization	2007-06-02 17:48:59 UTC (rev 1922)
+++ dists/trunk/live-helper/helpers/lh_chroot_localization	2007-06-02 18:03:32 UTC (rev 1923)
@@ -599,36 +599,13 @@
 	esac
 
 	# Setting languages
-	if [ -z "${ICEAPE}" ]
-	then
-		ICEAPE="${LIVE_LANGUAGE}"
-	fi
+	ICEAPE="${ICEAPE:-$LIVE_LANGUAGE}"
+	ICEDOVE="${ICEDOVE:-$LIVE_LANGUAGE}"
+	ICEWEASEL="${ICEWEASEL:-$LIVE_LANGUAGE}"
+	KDE="${KDE:-$LIVE_LANGUAGE}"
+	KOFFICE="${KOFFICE:-$LIVE_LANGUAGE}"
+	OPENOFFICE="${OPENOFFICE:-$LIVE_LANGUAGE}"
 
-	if [ -z "${ICEDOVE}" ]
-	then
-		ICEDOVE="${LIVE_LANGUAGE}"
-	fi
-
-	if [ -z "${ICEWEASEL}" ]
-	then
-		ICEWEASEL="${LIVE_LANGUAGE}"
-	fi
-
-	if [ -z "${KDE}" ]
-	then
-		KDE="${LIVE_LANGUAGE}"
-	fi
-
-	if [ -z "${KOFFICE}" ]
-	then
-		KOFFICE="${LIVE_LANGUAGE}"
-	fi
-
-	if [ -z "${OPENOFFICE}" ]
-	then
-		OPENOFFICE="${LIVE_LANGUAGE}"
-	fi
-
 	# Setting packages
 	for LOCALIZATION in ${LOCALIZATIONS}
 	do

Modified: dists/trunk/live-helper/helpers/make-live
===================================================================
--- dists/trunk/live-helper/helpers/make-live	2007-06-02 17:48:59 UTC (rev 1922)
+++ dists/trunk/live-helper/helpers/make-live	2007-06-02 18:03:32 UTC (rev 1923)
@@ -355,10 +355,7 @@
 
 	Set_defaults
 
-	if [ -z "${ROOT}" ]
-	then
-		ROOT="${LIVE_ROOT}"
-	fi
+	ROOT="${ROOT:-$LIVE_ROOT}"
 
 	# Source existing configuration
 	Read_conffile "${ROOT}"/config/common




More information about the Debian-live-changes mailing list