summaryrefslogtreecommitdiff
path: root/helpers/make-live
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/make-live')
-rwxr-xr-xhelpers/make-live17
1 files changed, 8 insertions, 9 deletions
diff --git a/helpers/make-live b/helpers/make-live
index d4ad57aae..3f71f5cf1 100755
--- a/helpers/make-live
+++ b/helpers/make-live
@@ -22,13 +22,15 @@
set -e
-# Source common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+# Including common functions
+LH_BASE="${LH_BASE:-/usr/share/live-helper}"
+
+for FUNCTION in "${LH_BASE}"/functions/*.sh
do
- . ${FUNCTION}
+ . "${FUNCTION}"
done
-# Set static variables
+# Setting static variables
PROGRAM="`basename ${0}`"
DESCRIPTION="utility to build Debian Live systems"
USAGE="${PROGRAM} [config] [--mode MODE] [--config CONFIG] [--apt apt|aptitude] [--apt-ftpproxy URL] [--apt-httpproxy URL] [--binary-indices enabled|disabled] [--apt-pdiffs enabled|disabled] [--apt-recommends enabled|disabled] [--apt-secure enabled|disabled] [--bootstrap cdebootstrap|deboostrap] [--cache enabled|disabled] [--debconf-frontend dialog|readline|noninteractive] [--debconf-priority low|medium|high|critical] [--debconf-nowarnings yes|no] [--genisoimage genisoimage|mkisofs] [--losetup losetup|losetup.org] [--tasksel aptitude|tasksel] [-r|--root DIRECTORY] [-a|--architecture ARCHITECTURE] [-d|--distribution stable|testing|unstable|etch|lenny|sid] [--distribution-config DIRECTORY] [-f|--bootstrap-flavour minimal|standard] [-m|--mirror-bootstrap URL] [--mirror-bootstrap-security URL] [--mirror-binary URL] [--mirror-binary-security URL] [--sections SECTION|\"SECTIONS\"] [--interactive shell|x11|xnest] [-k|--linux-flavour FLAVOUR] [--linux-packages PACKAGE|\"PACKAGES\"] [--keyring-packages PACKAGE|\"PACKAGES\"] [--hooks \"COMMAND\"|\"COMMANDS\"] [-l|--language LANGUAGE] [--packages PACKAGE|\"PACKAGES\"] [-p|--packages-lists LIST|\"LISTS\"] [--tasks TASK|\"TASKS\"] [--security enabled|disabled] [--symlinks enabled|disabled] [--sysvinit enabled|disabled] [--bootappend BOOT_PARAMETER|\"BOOT_PARAMETERS\"] [-e|--encryption ALGORITHM] [--username NAME] [--hostname NAME] [--chroot-filesystem ext2|plain|squashfs] [--memtest memtest86|memtest86+] [--iso-volume STRING] [--net-server HOSTNAME|IP] [--net-path DIRECTORY] [--source enabled|disabled] [--bootloader grub|syslinux] [--grub-splash FILE] [--syslinux-splash FILE] [-b|--binary-images hdd|iso|usb-hdd|net] [-s|--source-images generic|hdd|iso|usb-hdd|net] [--includes PATH] [--templates PATH] [--breakpoints] [--debug] [--force] [--quiet] [--verbose] [--root-command sudo]"
@@ -39,7 +41,7 @@ Local_arguments ()
{
ARGUMENTS="`getopt --longoptions mode:,config:,apt:,apt-ftpproxy:,apt-httpproxy:,binary-indices:,apt-pdiffs:,apt-recommends:,apt-secure:,bootstrap:,cache:,debconf-frontend:,debconf-priority:,debconf-nowarnings:,genisoimage:,losetup:,tasksel:,root:,architecture:,distribution:,distribution-config:,flavour:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,interactive:,kernel:,kernel-packages:,keyring-packages:,hooks:,language:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,bootappend:,encryption:,username:,hostname:,chroot-filesystem:,memtest:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,server-address:,server-path:,source:,bootloader:,grub-splash:,syslinux-splash:,binary-images:,binary-source:,includes:,templates:,help,usage,version,force,breakpoints,debug,quiet,verbose,root-command:,initramfs: --name=${PROGRAM} --options r:a:d:f:m:k:l:p:e:b:s:huv --shell sh -- "${@}"`"
- if [ "${?}" != "0" ]
+ if [ "${?}" -ne "0" ]
then
echo "Terminating." >&2
exit 1
@@ -355,10 +357,7 @@ Main ()
Set_defaults
- if [ -z "${ROOT}" ]
- then
- ROOT="${LIVE_ROOT}"
- fi
+ ROOT="${ROOT:-$LIVE_ROOT}"
# Source existing configuration
Read_conffile "${ROOT}"/config/common