~tom-gall/live-build/integrate-linaro-media-create

« back to all changes in this revision

Viewing changes to helpers/lh_chroot_local-includes

  • Committer: Daniel Baumann
  • Date: 2011-03-09 17:18:29 UTC
  • Revision ID: git-v1:97c3a13dcc9becf93cb7c2aa89ea3e00f06b9179
Adding live-helper 1.0~a10-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# lh_chroot_local-includes(1) - copy local files into chroot
 
4
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
 
5
#
 
6
# live-helper 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.
 
9
 
 
10
set -e
 
11
 
 
12
# Source common functions
 
13
for FUNCTION in /usr/share/live-helper/functions/*.sh
 
14
do
 
15
        . ${FUNCTION}
 
16
done
 
17
 
 
18
# Set static variables
 
19
DESCRIPTION="copy local files into chroot"
 
20
HELP=""
 
21
USAGE="${PROGRAM} [--force]"
 
22
 
 
23
Arguments "${@}"
 
24
 
 
25
Echo_debug "Init ${PROGRAM}"
 
26
 
 
27
# Reading configuration files
 
28
Read_conffile config/common
 
29
Read_conffile config/bootstrap
 
30
Read_conffile config/chroot
 
31
Read_conffile config/binary
 
32
Read_conffile config/source
 
33
Set_defaults
 
34
 
 
35
Breakpoint "chroot_local-includes: Init"
 
36
 
 
37
# Requiring stage file
 
38
Require_stagefile .stage/bootstrap
 
39
 
 
40
# Checking stage file
 
41
Check_stagefile .stage/chroot_local-includes
 
42
 
 
43
# Checking lock file
 
44
Check_lockfile .lock
 
45
 
 
46
# Creating lock file
 
47
Create_lockfile .lock
 
48
 
 
49
if ls config/chroot_local-includes/* &> /dev/null
 
50
then
 
51
        # Copying includes
 
52
        cd config/chroot_local-includes
 
53
        find . | cpio -dmpu "${OLDPWD}"/chroot
 
54
        cd "${OLDPWD}"
 
55
 
 
56
        # Creating stage file
 
57
        Create_stagefile .stage/chroot_local-includes
 
58
fi