live-build/scripts/build/binary

101 lines
2.3 KiB
Plaintext
Raw Normal View History

2007-09-23 08:04:46 +00:00
#!/bin/sh
2007-09-23 08:04:48 +00:00
# lh_binary(1) - build binary images
# Copyright (C) 2006-2010 Daniel Baumann <daniel@debian.org>
2007-09-23 08:04:48 +00:00
#
# live-helper 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.
2007-09-23 08:04:46 +00:00
2007-09-23 08:04:48 +00:00
set -e
2007-09-23 08:05:11 +00:00
# Including common functions
. "${LH_BASE:-/usr/share/live/build}"/scripts/build.sh
2007-09-23 08:04:48 +00:00
2007-09-23 08:05:11 +00:00
# Setting static variables
DESCRIPTION="$(Echo 'build binary images')"
2007-09-23 08:04:48 +00:00
HELP=""
USAGE="${PROGRAM} [--force]"
Arguments "${@}"
2007-09-23 08:05:16 +00:00
# Reading configuration files
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
2007-09-23 08:05:16 +00:00
Set_defaults
# Setup cleanup function
Setup_cleanup
2007-09-23 08:04:48 +00:00
# Preparing root filesystem
lh binary_chroot ${*}
2007-09-23 08:04:46 +00:00
if [ "${LH_BUILD_WITH_CHROOT}" = "true" ]
2007-09-23 08:05:15 +00:00
then
# Configuring chroot
lh chroot_devpts install ${*}
lh chroot_proc install ${*}
lh chroot_selinuxfs install ${*}
lh chroot_sysfs install ${*}
lh chroot_hosts install ${*}
lh chroot_resolv install ${*}
lh chroot_hostname install ${*}
lh chroot_sysv-rc install ${*}
lh chroot_upstart install ${*}
lh chroot_apt install-binary ${*}
lh chroot_sources install ${*}
2007-09-23 08:05:15 +00:00
fi
2007-09-23 08:04:48 +00:00
# Building root filesystem
lh binary_rootfs ${*}
lh binary_manifest ${*}
lh binary_encryption ${*}
2007-09-23 08:04:46 +00:00
# Prepare images
lh binary_local-packageslists ${*}
lh binary_linux-image ${*}
lh binary_debian-installer ${*}
lh binary_memtest ${*}
lh binary_grub ${*}
lh binary_grub2 ${*}
lh binary_syslinux ${*}
lh binary_yaboot ${*}
lh binary_silo ${*}
lh binary_disk ${*}
lh binary_win32-loader ${*}
lh binary_includes ${*}
lh binary_local-includes ${*}
lh binary_local-hooks ${*}
2010-05-01 05:39:49 +00:00
lh binary_checksums ${*}
2007-09-23 08:04:46 +00:00
if [ "${LH_BUILD_WITH_CHROOT}" != "true" ]
then
lh chroot_devpts install ${*}
lh chroot_proc install ${*}
lh chroot_selinuxfs install ${*}
lh chroot_sysfs install ${*}
fi
2007-09-23 08:04:46 +00:00
# Building images
lh binary_iso ${*}
lh binary_net ${*}
lh binary_tar ${*}
lh binary_usb ${*}
lh binary_virtual-hdd ${*}
2007-09-23 08:04:46 +00:00
if [ "${LH_BUILD_WITH_CHROOT}" = "true" ]
2007-09-23 08:05:15 +00:00
then
# Deconfiguring chroot
rm -f .stage/chroot_sources
lh chroot_hostname remove ${*}
lh chroot_resolv remove ${*}
lh chroot_hosts remove ${*}
2007-09-23 08:05:15 +00:00
fi
lh chroot_apt remove ${*}
lh chroot_sysv-rc remove ${*}
lh chroot_sysfs remove ${*}
lh chroot_upstart remove ${*}
lh chroot_selinuxfs remove ${*}
lh chroot_proc remove ${*}
lh chroot_devpts remove ${*}