2014-08-27 21:14:12 +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>
|
2014-08-27 21:14:12 +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="Copy files into binary"
|
2014-08-27 21:14:12 +00:00
|
|
|
USAGE="${PROGRAM} [--force]"
|
|
|
|
|
2015-02-05 02:30:47 -01:00
|
|
|
# Processing arguments and configuration files
|
|
|
|
Init_config_data "${@}"
|
2014-08-27 21:14:12 +00:00
|
|
|
|
|
|
|
Echo_message "Begin copying binary includes..."
|
|
|
|
|
|
|
|
# Requiring stage file
|
2020-03-15 12:05:44 -01:00
|
|
|
Require_stagefiles config bootstrap
|
2014-08-27 21:14:12 +00:00
|
|
|
|
|
|
|
# Checking stage file
|
2020-03-13 16:11:53 -01:00
|
|
|
Check_stagefile
|
2014-08-27 21:14:12 +00:00
|
|
|
|
2020-03-13 15:19:59 -01:00
|
|
|
# Acquire lock file
|
2015-02-05 02:30:47 -01:00
|
|
|
Acquire_lockfile
|
2014-08-27 21:14:12 +00:00
|
|
|
|
|
|
|
if Find_files config/includes.binary/
|
|
|
|
then
|
|
|
|
# Copying includes
|
|
|
|
cd config/includes.binary
|
|
|
|
find . | cpio -dmpu --no-preserve-owner "${OLDPWD}"/binary
|
|
|
|
cd "${OLDPWD}"
|
|
|
|
|
|
|
|
# Removing symlinks
|
2020-03-28 04:13:11 -01:00
|
|
|
if [ "${LIVE_IMAGE_TYPE}" = "hdd" ]; then
|
|
|
|
find binary -type l | xargs rm -f
|
|
|
|
fi
|
2014-08-27 21:14:12 +00:00
|
|
|
fi
|
2020-03-12 00:38:58 -01:00
|
|
|
|
|
|
|
# Creating stage file
|
2020-03-13 16:11:53 -01:00
|
|
|
Create_stagefile
|