Moving partial python rewrite to separate branch, let's do it in the jessie+1 cycle...
[debian-live-build.git] / scripts / build / source_live
blob05de31f7456a1591dcb1a1436df82ac0c3bdf524
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 # Setting static variables
17 DESCRIPTION="$(Echo 'copy live config into source')"
18 HELP=""
19 USAGE="${PROGRAM} [--force]"
21 Arguments "${@}"
23 # Reading configuration files
24 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
25 Set_defaults
27 if [ "${LB_SOURCE}" != "true" ]
28 then
29 exit 0
32 Echo_message "Begin copying live-build configuration..."
34 # Requiring stage file
35 Require_stagefile .build/config .build/bootstrap
37 # Checking stage file
38 Check_stagefile .build/source_live
40 # Checking lock file
41 Check_lockfile .lock
43 # Creating lock file
44 Create_lockfile .lock
46 # Remove old sources
47 if [ -d source/live ]
48 then
49 rm -rf source/live
52 # Copy system configuration
53 mkdir -p source/live
54 cp -a config source/live
56 if Find_files auto/*
57 then
58 cp -a auto source/live
61 # Creating stage file
62 Create_stagefile .build/source_live