Moving partial python rewrite to separate branch, let's do it in the jessie+1 cycle...
[debian-live-build.git] / scripts / build / bootstrap
blob8a8293a5ccfc57c70b83f2ffd0f31896feb39358
1 #!/bin/sh
3 ## live-build(7) - System Build Scripts
4 ## Copyright (C) 2006-2014 Daniel Baumann <mail@daniel-baumann.ch>
5 ##
6 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7 ## This is free software, and you are welcome to redistribute it
8 ## under certain conditions; see COPYING for details.
11 set -e
13 # Including common functions
14 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
16 # Automatically populating config tree
17 if [ -x auto/config ] && [ ! -e .build/config ]
18 then
19 Echo_message "Automatically populating config tree."
20 lb config
23 # Setting static variables
24 DESCRIPTION="$(Echo 'bootstrap a Debian system')"
25 HELP=""
26 USAGE="${PROGRAM} [--force]"
28 Arguments "${@}"
30 # Reading configuration files
31 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
32 Set_defaults
34 # Setup cleanup function
35 Setup_cleanup
37 # Bootstrapping system
38 lb bootstrap_cache restore ${@}
39 lb bootstrap_cdebootstrap ${@}
40 lb bootstrap_debootstrap ${@}
41 lb bootstrap_archive-keys ${@}
42 lb bootstrap_cache save ${@}
44 # Configuring chroot
45 lb chroot_devpts install ${@}
46 lb chroot_proc install ${@}
47 lb chroot_selinuxfs install ${@}
48 lb chroot_sysfs install ${@}
49 lb chroot_debianchroot install ${@}
50 lb chroot_dpkg install ${@}
51 lb chroot_tmpfs install ${@}
52 lb chroot_sysv-rc install ${@}
53 lb chroot_upstart install ${@}
54 lb chroot_hosts install ${@}
55 lb chroot_resolv install ${@}
56 lb chroot_hostname install ${@}
57 lb chroot_apt install ${@}
59 lb bootstrap_archives binary ${@}
61 # Deconfiguring chroot
62 lb chroot_apt remove ${@}
63 lb chroot_hostname remove ${@}
64 lb chroot_resolv remove ${@}
65 lb chroot_hosts remove ${@}
66 lb chroot_sysv-rc remove ${@}
67 lb chroot_upstart remove ${@}
68 lb chroot_tmpfs remove ${@}
69 lb chroot_dpkg remove ${@}
70 lb chroot_debianchroot remove ${@}
71 lb chroot_sysfs remove ${@}
72 lb chroot_selinuxfs remove ${@}
73 lb chroot_proc remove ${@}
74 lb chroot_devpts remove ${@}