source: live-build/trunk/fuentes/scripts/build/lb_bootstrap_copy @ 900

Last change on this file since 900 was 900, checked in by kbut, 3 years ago

add original source

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/sh
2
3## live-build(7) - System Build Scripts
4## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
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.
9
10
11set -e
12
13# Including common functions
14( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
15
16# Setting static variables
17DESCRIPTION="$(Echo 'bootstrap by copying the host system')"
18HELP=""
19USAGE="${PROGRAM} [--force]"
20
21Arguments "${@}"
22
23# Reading configuration files
24Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
25Set_defaults
26
27if [ "${LB_BOOTSTRAP}" != "copy" ]
28then
29        exit 0
30fi
31
32# Check architecture
33Check_crossarchitectures
34
35Echo_message "Begin bootstrapping system..."
36
37# Ensure that a system is built as root
38lb testroot
39
40# Checking stage file
41Check_stagefile .build/bootstrap
42
43# Checking lock file
44Check_lockfile .lock
45
46# Creating lock file
47Create_lockfile .lock
48
49# Copying host system
50mkdir chroot
51cd chroot
52tar c / --exclude /proc --exclude /sys --exclude "$(dirname ${PWD})" | tar xv
53cd ..
54
55# Creating stage file
56Create_stagefile .build/bootstrap
Note: See TracBrowser for help on using the repository browser.