2013-06-20 08:57:56 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
## live-build(7) - System Build Scripts
|
2020-03-11 09:07:21 -01:00
|
|
|
## Copyright (C) 2016-2020 The Debian Live team
|
2015-01-04 18:05:39 -01:00
|
|
|
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
|
2013-06-20 08:57:56 +00:00
|
|
|
##
|
|
|
|
## This program 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.
|
|
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Including common functions
|
|
|
|
[ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
|
|
|
|
|
|
|
|
# Setting static variables
|
2015-02-05 02:30:47 -01:00
|
|
|
DESCRIPTION="Preparing installer images"
|
2013-06-20 08:57:56 +00:00
|
|
|
USAGE="${PROGRAM} [--force]"
|
|
|
|
|
2015-02-05 02:30:47 -01:00
|
|
|
# Automatically populating config tree
|
|
|
|
Auto_build_config
|
|
|
|
|
2015-02-05 02:30:47 -01:00
|
|
|
# Processing arguments and configuration files
|
|
|
|
Init_config_data "${@}"
|
2013-06-20 08:57:56 +00:00
|
|
|
|
2015-02-05 02:30:47 -01:00
|
|
|
# Setting up cleanup function
|
|
|
|
Setup_clean_exit
|
2013-06-20 08:57:56 +00:00
|
|
|
|
2020-04-01 04:22:39 +00:00
|
|
|
if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]; then
|
2022-05-16 09:25:35 +00:00
|
|
|
# Use a fresh chroot environment, to not pollute the 'normal' chroot
|
|
|
|
lb installer_chroot "${@}"
|
|
|
|
|
2013-06-20 08:57:56 +00:00
|
|
|
# Configuring chroot
|
2020-04-05 16:29:31 +00:00
|
|
|
lb chroot_prep install all mode-archives-chroot "${@}"
|
2013-06-20 08:57:56 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Building installer
|
2020-04-01 08:29:52 +00:00
|
|
|
lb installer_debian-installer "${@}"
|
|
|
|
lb installer_preseed "${@}"
|
2013-06-20 08:57:56 +00:00
|
|
|
|
2020-04-01 04:22:39 +00:00
|
|
|
if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]; then
|
2013-06-20 08:57:56 +00:00
|
|
|
# Deconfiguring chroot
|
2020-04-05 16:29:31 +00:00
|
|
|
lb chroot_prep remove all mode-archives-chroot "${@}"
|
2022-05-16 09:25:35 +00:00
|
|
|
|
|
|
|
# Revert lb installer_chroot
|
|
|
|
mv chroot/chroot chroot.tmp
|
|
|
|
rm -rf chroot
|
|
|
|
mv chroot.tmp chroot
|
|
|
|
Remove_stagefile installer_chroot
|
2013-06-20 08:57:56 +00:00
|
|
|
fi
|
2020-03-16 01:12:47 -01:00
|
|
|
|
|
|
|
Echo_message "Installer stage completed"
|