summaryrefslogtreecommitdiff
path: root/scripts/build/lb_chroot_includes
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-09-07 15:16:23 +0200
committerDaniel Baumann <daniel@debian.org>2011-09-07 15:16:23 +0200
commit046095cffa06c76406e6cd7321ccbf789d09063a (patch)
tree5ecd5f65f2200b6dbbbdfab5ec210a4369bf9207 /scripts/build/lb_chroot_includes
parentdd853aa5d93df297f0ed03cc980749dfddfb292f (diff)
downloadvyos-live-build-046095cffa06c76406e6cd7321ccbf789d09063a.tar.gz
vyos-live-build-046095cffa06c76406e6cd7321ccbf789d09063a.zip
Renaming lb_chroot_local-includes into lb_chroot_includes and check for includes in config/includes.chroot.
Diffstat (limited to 'scripts/build/lb_chroot_includes')
-rwxr-xr-xscripts/build/lb_chroot_includes50
1 files changed, 50 insertions, 0 deletions
diff --git a/scripts/build/lb_chroot_includes b/scripts/build/lb_chroot_includes
new file mode 100755
index 000000000..0d08dd947
--- /dev/null
+++ b/scripts/build/lb_chroot_includes
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+## live-build(7) - System Build Scripts
+## Copyright (C) 2006-2011 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.
+
+
+set -e
+
+# Including common functions
+. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+
+# Setting static variables
+DESCRIPTION="$(Echo 'copy files into chroot')"
+HELP=""
+USAGE="${PROGRAM} [--force]"
+
+Arguments "${@}"
+
+# Reading configuration files
+Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
+Set_defaults
+
+Echo_message "Begin copying chroot includes..."
+
+# Requiring stage file
+Require_stagefile .stage/config .stage/bootstrap
+
+# Checking stage file
+Check_stagefile .stage/includes.chroot
+
+# Checking lock file
+Check_lockfile .lock
+
+# Creating lock file
+Create_lockfile .lock
+
+if Find_files config/includes.chroot/
+then
+ # Copying includes
+ cd config/includes.chroot
+ find . | cpio -dmpu --no-preserve-owner "${OLDPWD}"/chroot
+ cd "${OLDPWD}"
+
+ # Creating stage file
+ Create_stagefile .stage/chroot_includes
+fi