summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-07-19 19:37:26 +0200
committerDaniel Baumann <daniel@debian.org>2012-07-19 21:11:59 +0200
commit8473b925fd94fdb7bb1ae6309a4ab58d490382c9 (patch)
tree94b76a6288395e37619b900f3eea2009a25d9b28 /scripts/build
parent6c0ddb7d6d72d15ab2887a4b40de2c5d71f26d3a (diff)
downloadvyos-live-build-8473b925fd94fdb7bb1ae6309a4ab58d490382c9.tar.gz
vyos-live-build-8473b925fd94fdb7bb1ae6309a4ab58d490382c9.zip
Fixing up inclusion of functions while allowing local usage of live-build with different file layouts.
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/lb_binary3
-rwxr-xr-xscripts/build/lb_binary_checksums2
-rwxr-xr-xscripts/build/lb_binary_chroot2
-rwxr-xr-xscripts/build/lb_binary_debian-installer16
-rwxr-xr-xscripts/build/lb_binary_disk32
-rwxr-xr-xscripts/build/lb_binary_grub2
-rwxr-xr-xscripts/build/lb_binary_grub22
-rwxr-xr-xscripts/build/lb_binary_hdd2
-rwxr-xr-xscripts/build/lb_binary_hooks19
-rwxr-xr-xscripts/build/lb_binary_includes2
-rwxr-xr-xscripts/build/lb_binary_iso2
-rwxr-xr-xscripts/build/lb_binary_linux-image2
-rwxr-xr-xscripts/build/lb_binary_local-includes2
-rwxr-xr-xscripts/build/lb_binary_manifest2
-rwxr-xr-xscripts/build/lb_binary_memtest2
-rwxr-xr-xscripts/build/lb_binary_netboot2
-rwxr-xr-xscripts/build/lb_binary_package-lists2
-rwxr-xr-xscripts/build/lb_binary_rootfs2
-rwxr-xr-xscripts/build/lb_binary_silo2
-rwxr-xr-xscripts/build/lb_binary_syslinux9
-rwxr-xr-xscripts/build/lb_binary_tar2
-rwxr-xr-xscripts/build/lb_binary_virtual-hdd2
-rwxr-xr-xscripts/build/lb_binary_win32-loader2
-rwxr-xr-xscripts/build/lb_binary_yaboot2
-rwxr-xr-xscripts/build/lb_binary_zsync2
-rwxr-xr-xscripts/build/lb_bootstrap2
-rwxr-xr-xscripts/build/lb_bootstrap_cache2
-rwxr-xr-xscripts/build/lb_bootstrap_cdebootstrap2
-rwxr-xr-xscripts/build/lb_bootstrap_copy2
-rwxr-xr-xscripts/build/lb_bootstrap_debootstrap2
-rwxr-xr-xscripts/build/lb_build2
-rwxr-xr-xscripts/build/lb_chroot2
-rwxr-xr-xscripts/build/lb_chroot_apt2
-rwxr-xr-xscripts/build/lb_chroot_archives62
-rwxr-xr-xscripts/build/lb_chroot_cache2
-rwxr-xr-xscripts/build/lb_chroot_debianchroot2
-rwxr-xr-xscripts/build/lb_chroot_devpts2
-rwxr-xr-xscripts/build/lb_chroot_dpkg2
-rwxr-xr-xscripts/build/lb_chroot_hacks2
-rwxr-xr-xscripts/build/lb_chroot_hooks16
-rwxr-xr-xscripts/build/lb_chroot_hostname2
-rwxr-xr-xscripts/build/lb_chroot_hosts2
-rwxr-xr-xscripts/build/lb_chroot_includes2
-rwxr-xr-xscripts/build/lb_chroot_install-packages2
-rwxr-xr-xscripts/build/lb_chroot_interactive2
-rwxr-xr-xscripts/build/lb_chroot_linux-image2
-rwxr-xr-xscripts/build/lb_chroot_live-packages2
-rwxr-xr-xscripts/build/lb_chroot_local-patches2
-rwxr-xr-xscripts/build/lb_chroot_package-lists2
-rwxr-xr-xscripts/build/lb_chroot_preseed2
-rwxr-xr-xscripts/build/lb_chroot_proc2
-rwxr-xr-xscripts/build/lb_chroot_resolv2
-rwxr-xr-xscripts/build/lb_chroot_selinuxfs2
-rwxr-xr-xscripts/build/lb_chroot_sysfs2
-rwxr-xr-xscripts/build/lb_chroot_sysv-rc2
-rwxr-xr-xscripts/build/lb_chroot_task-lists2
-rwxr-xr-xscripts/build/lb_chroot_tmpfs2
-rwxr-xr-xscripts/build/lb_chroot_upstart2
-rwxr-xr-xscripts/build/lb_clean2
-rwxr-xr-xscripts/build/lb_config2
-rwxr-xr-xscripts/build/lb_local19
-rwxr-xr-xscripts/build/lb_source2
-rwxr-xr-xscripts/build/lb_source_checksums2
-rwxr-xr-xscripts/build/lb_source_debian2
-rwxr-xr-xscripts/build/lb_source_debian-live2
-rwxr-xr-xscripts/build/lb_source_disk2
-rwxr-xr-xscripts/build/lb_source_hdd2
-rwxr-xr-xscripts/build/lb_source_iso2
-rwxr-xr-xscripts/build/lb_source_tar2
-rwxr-xr-xscripts/build/lb_source_virtual-hdd2
-rwxr-xr-xscripts/build/lb_testroot2
71 files changed, 169 insertions, 133 deletions
diff --git a/scripts/build/lb_binary b/scripts/build/lb_binary
index 0ffb7bf88..3f56a589e 100755
--- a/scripts/build/lb_binary
+++ b/scripts/build/lb_binary
@@ -11,7 +11,8 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
+
# Automatically populating config tree
if [ -x auto/config ] && [ ! -e .build/config ]
diff --git a/scripts/build/lb_binary_checksums b/scripts/build/lb_binary_checksums
index d86b55d64..2cbe9af51 100755
--- a/scripts/build/lb_binary_checksums
+++ b/scripts/build/lb_binary_checksums
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'create binary checksums')"
diff --git a/scripts/build/lb_binary_chroot b/scripts/build/lb_binary_chroot
index 92e1667b6..190bd8e1c 100755
--- a/scripts/build/lb_binary_chroot
+++ b/scripts/build/lb_binary_chroot
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'copy chroot into chroot')"
diff --git a/scripts/build/lb_binary_debian-installer b/scripts/build/lb_binary_debian-installer
index bdf7308ea..c49ec8d0b 100755
--- a/scripts/build/lb_binary_debian-installer
+++ b/scripts/build/lb_binary_debian-installer
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'install debian-installer into binary')"
@@ -671,9 +671,17 @@ then
fi
# Excluding udebs
- grep -v "^#" "${LB_BASE}"/data/debian-cd/"${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"/udeb_exclude > exclude || true
- grep -v "^#" "${LB_BASE}"/data/debian-cd/"${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"/exclude-udebs >> exclude || true
- grep -v "^#" "${LB_BASE}"/data/debian-cd/"${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"/exclude-udebs-${LB_ARCHITECTURES} >> exclude || true
+ for LOCATION in "${LIVE_BUILD}/data/debian-cd" /usr/share/live/build/data/debian-cd
+ do
+ if [ -e "${LOCATION}" ]
+ then
+ grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/udeb_exclude" > exclude || true
+ grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs" >> exclude || true
+ grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs-${LB_ARCHITECTURES}" >> exclude || true
+
+ continue
+ fi
+ done
# Local exclude file
if [ -e ../config/binary_debian-installer/udeb_exclude ]
diff --git a/scripts/build/lb_binary_disk b/scripts/build/lb_binary_disk
index 7162db2c0..c6075677c 100755
--- a/scripts/build/lb_binary_disk
+++ b/scripts/build/lb_binary_disk
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'install disk information into binary')"
@@ -135,7 +135,15 @@ case "${LB_DEBIAN_INSTALLER}" in
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/CD Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
- cp "${LB_BASE}"/data/debian-cd/${LB_PARENT_DISTRIBUTION}/${LB_ARCHITECTURES}_udeb_include binary/.disk/udeb_include
+ for LOCATION in "${LIVE_BUILD}/data/debian-cd" /usr/share/live/build/data/debian-cd
+ do
+ if [ -e "${LOCATION}" ]
+ then
+ cp "${LOCATION}/${LB_PARENT_DISTRIBUTION}/${LB_ARCHITECTURES}_udeb_include" binary/.disk/udeb_include
+
+ continue
+ fi
+ done
;;
true|netinst|live)
@@ -152,7 +160,15 @@ case "${LB_DEBIAN_INSTALLER}" in
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/NETINST Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
fi
- cp "${LB_BASE}"/data/debian-cd/${LB_PARENT_DISTRIBUTION}/${LB_ARCHITECTURES}_netinst_udeb_include binary/.disk/udeb_include
+ for LOCATION in "${LIVE_BUILD}/data/debian-cd" /usr/share/live/build/data/debian-cd
+ do
+ if [ -e "${LOCATION}" ]
+ then
+ cp "${LOCATION}/${LB_PARENT_DISTRIBUTION}/${LB_ARCHITECTURES}_netinst_udeb_include" binary/.disk/udeb_include
+
+ continue
+ fi
+ done
if [ "${LB_DEBIAN_INSTALLER}" = "live" ]
then
@@ -167,7 +183,15 @@ case "${LB_DEBIAN_INSTALLER}" in
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/BC Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
- cp "${LB_BASE}"/data/debian-cd/${LB_PARENT_DISTRIBUTION}/${LB_ARCHITECTURES}_businesscard_udeb_include binary/.disk/udeb_include
+ for LOCATION in "${LIVE_BUILD}/data/debian-cd" /usr/share/live/build/data/debian-cd
+ do
+ if [ -e "${LOCATION}" ]
+ then
+ cp "${LOCATION}/${LB_PARENT_DISTRIBUTION}/${LB_ARCHITECTURES}_businesscard_udeb_include" binary/.disk/udeb_include
+
+ continue
+ fi
+ done
;;
false)
diff --git a/scripts/build/lb_binary_grub b/scripts/build/lb_binary_grub
index ea2b0fecb..6558a508b 100755
--- a/scripts/build/lb_binary_grub
+++ b/scripts/build/lb_binary_grub
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'installs grub into binary')"
diff --git a/scripts/build/lb_binary_grub2 b/scripts/build/lb_binary_grub2
index f28cd87c4..fbae1d89d 100755
--- a/scripts/build/lb_binary_grub2
+++ b/scripts/build/lb_binary_grub2
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'installs grub2 into binary')"
diff --git a/scripts/build/lb_binary_hdd b/scripts/build/lb_binary_hdd
index 13f3f1823..bf349a0f6 100755
--- a/scripts/build/lb_binary_hdd
+++ b/scripts/build/lb_binary_hdd
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build binary image')"
diff --git a/scripts/build/lb_binary_hooks b/scripts/build/lb_binary_hooks
index 889c3a12f..8ae800bd7 100755
--- a/scripts/build/lb_binary_hooks
+++ b/scripts/build/lb_binary_hooks
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'execute hooks in binary')"
@@ -43,12 +43,17 @@ Create_lockfile .lock
# Running hooks
for _HOOK in ${LB_BINARY_HOOKS}
do
- if [ -e "${LB_BASE}/hooks/???-${_HOOK}.binary" ]
- then
- cd binary
- ./"${LB_BASE}/hooks/???-${_HOOK}.binary" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
- cd "${OLDPWD}"
- fi
+ for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
+ do
+ if [ -e "${LOCATION}/hooks/???-${_HOOK}.binary" ]
+ then
+ cd binary
+ ./"${LOCATION}/hooks/???-${_HOOK}.binary" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
+ cd "${OLDPWD}"
+
+ continue
+ fi
+ done
done
## Processing local hooks
diff --git a/scripts/build/lb_binary_includes b/scripts/build/lb_binary_includes
index 0bd183a56..f578ef537 100755
--- a/scripts/build/lb_binary_includes
+++ b/scripts/build/lb_binary_includes
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'copy files into binary')"
diff --git a/scripts/build/lb_binary_iso b/scripts/build/lb_binary_iso
index 2595e6bee..ffc996ee4 100755
--- a/scripts/build/lb_binary_iso
+++ b/scripts/build/lb_binary_iso
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build iso binary image')"
diff --git a/scripts/build/lb_binary_linux-image b/scripts/build/lb_binary_linux-image
index 0997cea88..06321a7e9 100755
--- a/scripts/build/lb_binary_linux-image
+++ b/scripts/build/lb_binary_linux-image
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'install linux-image into binary')"
diff --git a/scripts/build/lb_binary_local-includes b/scripts/build/lb_binary_local-includes
index 84f7f3c07..773ea8d29 100755
--- a/scripts/build/lb_binary_local-includes
+++ b/scripts/build/lb_binary_local-includes
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'copy files into binary')"
diff --git a/scripts/build/lb_binary_manifest b/scripts/build/lb_binary_manifest
index 32d79eaa7..c8f1bd332 100755
--- a/scripts/build/lb_binary_manifest
+++ b/scripts/build/lb_binary_manifest
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'create manifest')"
diff --git a/scripts/build/lb_binary_memtest b/scripts/build/lb_binary_memtest
index f66701d68..a18583a0d 100755
--- a/scripts/build/lb_binary_memtest
+++ b/scripts/build/lb_binary_memtest
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'installs a memtest into binary')"
diff --git a/scripts/build/lb_binary_netboot b/scripts/build/lb_binary_netboot
index b4957a3b5..479630742 100755
--- a/scripts/build/lb_binary_netboot
+++ b/scripts/build/lb_binary_netboot
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build netboot binary image')"
diff --git a/scripts/build/lb_binary_package-lists b/scripts/build/lb_binary_package-lists
index 431ec9773..65104dbe0 100755
--- a/scripts/build/lb_binary_package-lists
+++ b/scripts/build/lb_binary_package-lists
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'install local packages into binary')"
diff --git a/scripts/build/lb_binary_rootfs b/scripts/build/lb_binary_rootfs
index 99a7695b3..69b535004 100755
--- a/scripts/build/lb_binary_rootfs
+++ b/scripts/build/lb_binary_rootfs
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build rootfs image')"
diff --git a/scripts/build/lb_binary_silo b/scripts/build/lb_binary_silo
index 2a9ca5c41..23753c886 100755
--- a/scripts/build/lb_binary_silo
+++ b/scripts/build/lb_binary_silo
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'installs silo into binary')"
diff --git a/scripts/build/lb_binary_syslinux b/scripts/build/lb_binary_syslinux
index 2788103dd..d6719f0dc 100755
--- a/scripts/build/lb_binary_syslinux
+++ b/scripts/build/lb_binary_syslinux
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'installs syslinux into binary')"
@@ -158,7 +158,12 @@ then
_SOURCE="config/bootloaders/${_BOOTLOADER}"
else
# Internal system copy
- _SOURCE="${LB_BASE:-/usr/share/live/build}/bootloaders/${_BOOTLOADER}"
+ if [ -n "${LIVE_BUILD}" ]
+ then
+ _SOURCE="${LIVE_BUILD}/bootloaders/${_BOOTLOADER}"
+ else
+ _SOURCE="/usr/share/live/build/bootloaders/${_BOOTLOADER}"
+ fi
fi
else
# External copy from chroot or system
diff --git a/scripts/build/lb_binary_tar b/scripts/build/lb_binary_tar
index 80630bdb0..9a133ec02 100755
--- a/scripts/build/lb_binary_tar
+++ b/scripts/build/lb_binary_tar
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build harddisk binary image')"
diff --git a/scripts/build/lb_binary_virtual-hdd b/scripts/build/lb_binary_virtual-hdd
index c25139a48..bfba5ee66 100755
--- a/scripts/build/lb_binary_virtual-hdd
+++ b/scripts/build/lb_binary_virtual-hdd
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build binary image')"
diff --git a/scripts/build/lb_binary_win32-loader b/scripts/build/lb_binary_win32-loader
index f0a5aebd8..ce150b6ec 100755
--- a/scripts/build/lb_binary_win32-loader
+++ b/scripts/build/lb_binary_win32-loader
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'copy win32-loader into binary')"
diff --git a/scripts/build/lb_binary_yaboot b/scripts/build/lb_binary_yaboot
index ef001ef06..bc55b6884 100755
--- a/scripts/build/lb_binary_yaboot
+++ b/scripts/build/lb_binary_yaboot
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'installs yaboot into binary')"
diff --git a/scripts/build/lb_binary_zsync b/scripts/build/lb_binary_zsync
index 5ec47e308..22442a81f 100755
--- a/scripts/build/lb_binary_zsync
+++ b/scripts/build/lb_binary_zsync
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build zsync control files')"
diff --git a/scripts/build/lb_bootstrap b/scripts/build/lb_bootstrap
index 9e9cdb09f..439dd8b72 100755
--- a/scripts/build/lb_bootstrap
+++ b/scripts/build/lb_bootstrap
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Automatically populating config tree
if [ -x auto/config ] && [ ! -e .build/config ]
diff --git a/scripts/build/lb_bootstrap_cache b/scripts/build/lb_bootstrap_cache
index fe50fe9f6..296adec33 100755
--- a/scripts/build/lb_bootstrap_cache
+++ b/scripts/build/lb_bootstrap_cache
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'cache bootstrap stage')"
diff --git a/scripts/build/lb_bootstrap_cdebootstrap b/scripts/build/lb_bootstrap_cdebootstrap
index 0d5577a48..ba7ea8a23 100755
--- a/scripts/build/lb_bootstrap_cdebootstrap
+++ b/scripts/build/lb_bootstrap_cdebootstrap
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'bootstrap a Debian system with cdebootstrap(1)')"
diff --git a/scripts/build/lb_bootstrap_copy b/scripts/build/lb_bootstrap_copy
index b0e1f7e52..17e65fb28 100755
--- a/scripts/build/lb_bootstrap_copy
+++ b/scripts/build/lb_bootstrap_copy
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'bootstrap by copying the host system')"
diff --git a/scripts/build/lb_bootstrap_debootstrap b/scripts/build/lb_bootstrap_debootstrap
index f169926cb..c47354d41 100755
--- a/scripts/build/lb_bootstrap_debootstrap
+++ b/scripts/build/lb_bootstrap_debootstrap
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'bootstrap a Debian system with debootstrap(8)')"
diff --git a/scripts/build/lb_build b/scripts/build/lb_build
index cd20b3490..ba8e1f50c 100755
--- a/scripts/build/lb_build
+++ b/scripts/build/lb_build
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Automatically populating config tree
if [ -x auto/config ] && [ ! -e .build/config ]
diff --git a/scripts/build/lb_chroot b/scripts/build/lb_chroot
index 71bcb71a6..7f654e000 100755
--- a/scripts/build/lb_chroot
+++ b/scripts/build/lb_chroot
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Automatically populating config tree
if [ -x auto/config ] && [ ! -e .build/config ]
diff --git a/scripts/build/lb_chroot_apt b/scripts/build/lb_chroot_apt
index a280d7846..32af22db2 100755
--- a/scripts/build/lb_chroot_apt
+++ b/scripts/build/lb_chroot_apt
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'manage /etc/apt/apt.conf')"
diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives
index f3845a070..220f8abe6 100755
--- a/scripts/build/lb_chroot_archives
+++ b/scripts/build/lb_chroot_archives
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'manage /etc/apt/sources.list')"
@@ -32,6 +32,14 @@ Require_stagefile .build/config .build/bootstrap
_LB_LOCAL_KEY_EMAIL="live-build-local-key@invalid"
+# FIXME: this is ugly
+if [ -n "${LIVE_BUILD}" ]
+then
+ _BASE="${LIVE_BUILD}"
+else
+ _BASE="/usr/share/live/build"
+fi
+
case "${LB_DERIVATIVE}" in
true)
_PARENT_FILE="sources.list.d/debian.list"
@@ -207,44 +215,44 @@ EOF
# Prefer archives from the config tree
# over the global ones.
- if ! ls "${LB_BASE}/archives/${REPOSITORY}"* > /dev/null 2>&1
+ if ! ls "${_BASE}/archives/${REPOSITORY}"* > /dev/null 2>&1
then
continue
fi
# Adding sources.list entries (chroot)
- if [ -e "${LB_BASE}/archives/${REPOSITORY}.chroot" ]
+ if [ -e "${_BASE}/archives/${REPOSITORY}.chroot" ]
then
sed -e "s|@DISTRIBUTION@|${_DISTRIBUTION}|g" \
-e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \
- "${LB_BASE}/archives/${REPOSITORY}.chroot" > \
+ "${_BASE}/archives/${REPOSITORY}.chroot" > \
"chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
- elif [ -e "${LB_BASE}/archives/${REPOSITORY}" ]
+ elif [ -e "${_BASE}/archives/${REPOSITORY}" ]
then
sed -e "s|@DISTRIBUTION@|${_DISTRIBUTION}|g" \
-e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \
- "${LB_BASE}/archives/${REPOSITORY}" > \
+ "${_BASE}/archives/${REPOSITORY}" > \
"chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
fi
# Adding pinning preferences (chroot)
- if [ -e "${LB_BASE}/archives/${REPOSITORY}.pref" ]
+ if [ -e "${_BASE}/archives/${REPOSITORY}.pref" ]
then
- cp "${LB_BASE}/archives/${REPOSITORY}.pref" chroot/etc/apt/sources.list.d
- elif [ -e "${LB_BASE}/archives/${REPOSITORY}.pref.chroot" ]
+ cp "${_BASE}/archives/${REPOSITORY}.pref" chroot/etc/apt/sources.list.d
+ elif [ -e "${_BASE}/archives/${REPOSITORY}.pref.chroot" ]
then
- cp "${LB_BASE}/archives/${REPOSITORY}.pref.chroot" "chroot/etc/apt/sources.list.d/${REPOSITORY}.pref"
+ cp "${_BASE}/archives/${REPOSITORY}.pref.chroot" "chroot/etc/apt/sources.list.d/${REPOSITORY}.pref"
fi
if [ "${LB_APT_SECURE}" != false ]
then
# Adding archive signing keys (chroot)
- if [ -e "${LB_BASE}/archives/${REPOSITORY}.key.chroot" ]
+ if [ -e "${_BASE}/archives/${REPOSITORY}.key.chroot" ]
then
- cat "${LB_BASE}/archives/${REPOSITORY}.key.chroot" | Chroot chroot "apt-key add -"
- elif [ -e "${LB_BASE}/archives/${REPOSITORY}.key" ]
+ cat "${_BASE}/archives/${REPOSITORY}.key.chroot" | Chroot chroot "apt-key add -"
+ elif [ -e "${_BASE}/archives/${REPOSITORY}.key" ]
then
- cat "${LB_BASE}/archives/${REPOSITORY}.key" | Chroot chroot "apt-key add -"
+ cat "${_BASE}/archives/${REPOSITORY}.key" | Chroot chroot "apt-key add -"
fi
fi
done
@@ -763,44 +771,44 @@ EOF
# Prefer archives from the config tree
# over the global ones.
- if ! ls "${LB_BASE}/archives/${REPOSITORY}"* > /dev/null 2>&1
+ if ! ls "${_BASE}/archives/${REPOSITORY}"* > /dev/null 2>&1
then
continue
fi
# Adding sources.list entries (binary)
- if [ -e "${LB_BASE}/archives/${REPOSITORY}.binary" ]
+ if [ -e "${_BASE}/archives/${REPOSITORY}.binary" ]
then
sed -e "s|@DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \
-e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \
- "${LB_BASE}/archives/${REPOSITORY}.binary" > \
+ "${_BASE}/archives/${REPOSITORY}.binary" > \
"chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
- elif [ -e "${LB_BASE}/archives/${REPOSITORY}" ]
+ elif [ -e "${_BASE}/archives/${REPOSITORY}" ]
then
sed -e "s|@DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \
-e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \
- "${LB_BASE}/archives/${REPOSITORY}" > \
+ "${_BASE}/archives/${REPOSITORY}" > \
"chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
fi
# Adding pinning preferences (binary)
- if [ -e "${LB_BASE}/archives/${REPOSITORY}.pref" ]
+ if [ -e "${_BASE}/archives/${REPOSITORY}.pref" ]
then
- cp "${LB_BASE}/archives/${REPOSITORY}.pref" chroot/etc/apt/sources.list.d
- elif [ -e "${LB_BASE}/archives/${REPOSITORY}.pref.binary" ]
+ cp "${_BASE}/archives/${REPOSITORY}.pref" chroot/etc/apt/sources.list.d
+ elif [ -e "${_BASE}/archives/${REPOSITORY}.pref.binary" ]
then
- cp "${LB_BASE}/archives/${REPOSITORY}.pref.binary" "chroot/etc/apt/sources.list.d/${REPOSITORY}.pref"
+ cp "${_BASE}/archives/${REPOSITORY}.pref.binary" "chroot/etc/apt/sources.list.d/${REPOSITORY}.pref"
fi
if [ "${LB_APT_SECURE}" != false ]
then
# Adding archive signing keys (binary)
- if [ -e "${LB_BASE}/archives/${REPOSITORY}.key.binary" ]
+ if [ -e "${_BASE}/archives/${REPOSITORY}.key.binary" ]
then
- cat "${LB_BASE}/archives/${REPOSITORY}.key.binary" | Chroot chroot "apt-key add -"
- elif [ -e "${LB_BASE}/archives/${REPOSITORY}.key" ]
+ cat "${_BASE}/archives/${REPOSITORY}.key.binary" | Chroot chroot "apt-key add -"
+ elif [ -e "${_BASE}/archives/${REPOSITORY}.key" ]
then
- cat "${LB_BASE}/archives/${REPOSITORY}.key" | Chroot chroot "apt-key add -"
+ cat "${_BASE}/archives/${REPOSITORY}.key" | Chroot chroot "apt-key add -"
fi
fi
done
diff --git a/scripts/build/lb_chroot_cache b/scripts/build/lb_chroot_cache
index ba9560065..d36018caf 100755
--- a/scripts/build/lb_chroot_cache
+++ b/scripts/build/lb_chroot_cache
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'cache chroot stage')"
diff --git a/scripts/build/lb_chroot_debianchroot b/scripts/build/lb_chroot_debianchroot
index f407607d8..16efd7a49 100755
--- a/scripts/build/lb_chroot_debianchroot
+++ b/scripts/build/lb_chroot_debianchroot
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'manage /etc/debian_chroot')"
diff --git a/scripts/build/lb_chroot_devpts b/scripts/build/lb_chroot_devpts
index 2df01dc40..6811f7567 100755
--- a/scripts/build/lb_chroot_devpts
+++ b/scripts/build/lb_chroot_devpts
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'mount /dev/pts')"
diff --git a/scripts/build/lb_chroot_dpkg b/scripts/build/lb_chroot_dpkg
index ec4681b5d..d7ddec7d6 100755
--- a/scripts/build/lb_chroot_dpkg
+++ b/scripts/build/lb_chroot_dpkg
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'manage /sbin/dpkg')"
diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks
index 334a5bfcb..82dfdc7e5 100755
--- a/scripts/build/lb_chroot_hacks
+++ b/scripts/build/lb_chroot_hacks
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'execute hacks in chroot')"
diff --git a/scripts/build/lb_chroot_hooks b/scripts/build/lb_chroot_hooks
index b07474d7a..1b754e04d 100755
--- a/scripts/build/lb_chroot_hooks
+++ b/scripts/build/lb_chroot_hooks
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'execute hooks in chroot')"
@@ -52,11 +52,15 @@ mount -o remount,ro,bind config chroot/root/config
# Copying hooks
for _HOOK in ${LB_CHROOT_HOOKS}
do
- if [ -e "${LB_BASE}"/hooks/???-"${_HOOK}".chroot ]
- then
- mkdir -p chroot/root/lb_chroot_hooks
- cp "${LB_BASE}"/hooks/???-"${_HOOK}".chroot chroot/root/lb_chroot_hooks
- fi
+ for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
+ do
+ if [ -e "${LOCATION}/hooks/???-${_HOOK}.binary" ]
+ then
+ mkdir -p chroot/root/lb_chroot_hooks
+ cp "${LOCATION}"/hooks/???-"${_HOOK}".chroot chroot/root/lb_chroot_hooks
+ continue
+ fi
+ done
done
# Running hooks
diff --git a/scripts/build/lb_chroot_hostname b/scripts/build/lb_chroot_hostname
index af7158207..185aedf13 100755
--- a/scripts/build/lb_chroot_hostname
+++ b/scripts/build/lb_chroot_hostname
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'manage /bin/hostname')"
diff --git a/scripts/build/lb_chroot_hosts b/scripts/build/lb_chroot_hosts
index 1e7a513f7..6cd75508f 100755
--- a/scripts/build/lb_chroot_hosts
+++ b/scripts/build/lb_chroot_hosts
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'manage /etc/hosts')"
diff --git a/scripts/build/lb_chroot_includes b/scripts/build/lb_chroot_includes
index 32237b2f4..c60a5a64a 100755
--- a/scripts/build/lb_chroot_includes
+++ b/scripts/build/lb_chroot_includes
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'copy files into chroot')"
diff --git a/scripts/build/lb_chroot_install-packages b/scripts/build/lb_chroot_install-packages
index ed5119d94..5f70cd3b1 100755
--- a/scripts/build/lb_chroot_install-packages
+++ b/scripts/build/lb_chroot_install-packages
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'install queued packages into chroot')"
diff --git a/scripts/build/lb_chroot_interactive b/scripts/build/lb_chroot_interactive
index cdc68c442..7532a8cf9 100755
--- a/scripts/build/lb_chroot_interactive
+++ b/scripts/build/lb_chroot_interactive
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'make build interactive')"
diff --git a/scripts/build/lb_chroot_linux-image b/scripts/build/lb_chroot_linux-image
index 312329d8b..e2d012c08 100755
--- a/scripts/build/lb_chroot_linux-image
+++ b/scripts/build/lb_chroot_linux-image
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'schedule kernel packages for installation')"
diff --git a/scripts/build/lb_chroot_live-packages b/scripts/build/lb_chroot_live-packages
index 654c7192b..f5b219ea1 100755
--- a/scripts/build/lb_chroot_live-packages
+++ b/scripts/build/lb_chroot_live-packages
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'schedule live packages for installation')"
diff --git a/scripts/build/lb_chroot_local-patches b/scripts/build/lb_chroot_local-patches
index f1a52396c..b82514df0 100755
--- a/scripts/build/lb_chroot_local-patches
+++ b/scripts/build/lb_chroot_local-patches
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'apply local patches against chroot')"
diff --git a/scripts/build/lb_chroot_package-lists b/scripts/build/lb_chroot_package-lists
index 5f408f11c..0237be13a 100755
--- a/scripts/build/lb_chroot_package-lists
+++ b/scripts/build/lb_chroot_package-lists
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'queue install of package lists into chroot')"
diff --git a/scripts/build/lb_chroot_preseed b/scripts/build/lb_chroot_preseed
index 553510b09..59dd1459d 100755
--- a/scripts/build/lb_chroot_preseed
+++ b/scripts/build/lb_chroot_preseed
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'execute local preseed in chroot')"
diff --git a/scripts/build/lb_chroot_proc b/scripts/build/lb_chroot_proc
index 45ad6c6ca..8a297232e 100755
--- a/scripts/build/lb_chroot_proc
+++ b/scripts/build/lb_chroot_proc
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'mount /proc')"
diff --git a/scripts/build/lb_chroot_resolv b/scripts/build/lb_chroot_resolv
index c2f4b3748..0ace6ed35 100755
--- a/scripts/build/lb_chroot_resolv
+++ b/scripts/build/lb_chroot_resolv
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'manage /etc/resolv.conf')"
diff --git a/scripts/build/lb_chroot_selinuxfs b/scripts/build/lb_chroot_selinuxfs
index bd5d6a962..c00713c92 100755
--- a/scripts/build/lb_chroot_selinuxfs
+++ b/scripts/build/lb_chroot_selinuxfs
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'mount /selinux')"
diff --git a/scripts/build/lb_chroot_sysfs b/scripts/build/lb_chroot_sysfs
index af633fb14..28addaf31 100755
--- a/scripts/build/lb_chroot_sysfs
+++ b/scripts/build/lb_chroot_sysfs
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'mount /sys')"
diff --git a/scripts/build/lb_chroot_sysv-rc b/scripts/build/lb_chroot_sysv-rc
index 497e57866..5fd136d43 100755
--- a/scripts/build/lb_chroot_sysv-rc
+++ b/scripts/build/lb_chroot_sysv-rc
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'manage /usr/sbin/policy-rc.d')"
diff --git a/scripts/build/lb_chroot_task-lists b/scripts/build/lb_chroot_task-lists
index c223a6859..f83014461 100755
--- a/scripts/build/lb_chroot_task-lists
+++ b/scripts/build/lb_chroot_task-lists
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'install task lists into chroot')"
diff --git a/scripts/build/lb_chroot_tmpfs b/scripts/build/lb_chroot_tmpfs
index fe00e1d2c..a59168329 100755
--- a/scripts/build/lb_chroot_tmpfs
+++ b/scripts/build/lb_chroot_tmpfs
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'use tmpfs to speedup the build')"
diff --git a/scripts/build/lb_chroot_upstart b/scripts/build/lb_chroot_upstart
index 915ded2bc..39412fdef 100755
--- a/scripts/build/lb_chroot_upstart
+++ b/scripts/build/lb_chroot_upstart
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'manage /sbin/initctl')"
diff --git a/scripts/build/lb_clean b/scripts/build/lb_clean
index b2f88470f..7f341d681 100755
--- a/scripts/build/lb_clean
+++ b/scripts/build/lb_clean
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Read meta config
if [ "${1}" != "noauto" ] && [ -x auto/clean ]
diff --git a/scripts/build/lb_config b/scripts/build/lb_config
index e8f1ef156..0c6a16f18 100755
--- a/scripts/build/lb_config
+++ b/scripts/build/lb_config
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Read meta config
if [ "${1}" != "noauto" ] && [ -x auto/config ]
diff --git a/scripts/build/lb_local b/scripts/build/lb_local
deleted file mode 100755
index 82e6c8a1b..000000000
--- a/scripts/build/lb_local
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-## live-build(7) - System Build Scripts
-## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
-##
-## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
-## This is free software, and you are welcome to redistribute it
-## under certain conditions; see COPYING for details.
-
-
-LB_BASE="${PWD}/live-build"
-PATH="${LB_BASE}/scripts/build:${PATH}"
-
-export LB_BASE PATH
-
-if [ ! -z "${1}" ]
-then
- exec lb "${@}"
-fi
diff --git a/scripts/build/lb_source b/scripts/build/lb_source
index 47f3fadde..d60bf7dfe 100755
--- a/scripts/build/lb_source
+++ b/scripts/build/lb_source
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Automatically populating config tree
if [ -x auto/config ] && [ ! -e .build/config ]
diff --git a/scripts/build/lb_source_checksums b/scripts/build/lb_source_checksums
index f21d7ae44..05adb6da6 100755
--- a/scripts/build/lb_source_checksums
+++ b/scripts/build/lb_source_checksums
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'create source checksums')"
diff --git a/scripts/build/lb_source_debian b/scripts/build/lb_source_debian
index 910bef420..61e4c381c 100755
--- a/scripts/build/lb_source_debian
+++ b/scripts/build/lb_source_debian
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'debian sources')"
diff --git a/scripts/build/lb_source_debian-live b/scripts/build/lb_source_debian-live
index ff7bd287c..5e0c86ff4 100755
--- a/scripts/build/lb_source_debian-live
+++ b/scripts/build/lb_source_debian-live
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'copy debian-live config into source')"
diff --git a/scripts/build/lb_source_disk b/scripts/build/lb_source_disk
index 657306627..71ff06374 100755
--- a/scripts/build/lb_source_disk
+++ b/scripts/build/lb_source_disk
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'install disk information into source')"
diff --git a/scripts/build/lb_source_hdd b/scripts/build/lb_source_hdd
index 990f81c58..cbf779b78 100755
--- a/scripts/build/lb_source_hdd
+++ b/scripts/build/lb_source_hdd
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build source image')"
diff --git a/scripts/build/lb_source_iso b/scripts/build/lb_source_iso
index beb61bad5..bac27936d 100755
--- a/scripts/build/lb_source_iso
+++ b/scripts/build/lb_source_iso
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build iso source image')"
diff --git a/scripts/build/lb_source_tar b/scripts/build/lb_source_tar
index 63933f06f..ed2cb4d5a 100755
--- a/scripts/build/lb_source_tar
+++ b/scripts/build/lb_source_tar
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build source tarball')"
diff --git a/scripts/build/lb_source_virtual-hdd b/scripts/build/lb_source_virtual-hdd
index 5d861d8df..2b82cfeba 100755
--- a/scripts/build/lb_source_virtual-hdd
+++ b/scripts/build/lb_source_virtual-hdd
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'build source image')"
diff --git a/scripts/build/lb_testroot b/scripts/build/lb_testroot
index 5f7b680f5..471938420 100755
--- a/scripts/build/lb_testroot
+++ b/scripts/build/lb_testroot
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'ensure that a system is built as root')"