source: live-build/trunk/fuentes/scripts/build/lb_build @ 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.6 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# Automatically populating config tree
17if [ -x auto/config ] && [ ! -e .build/config ]
18then
19        Echo_message "Automatically populating config tree."
20        lb config
21fi
22
23# Read meta config
24if [ "${1}" != "noauto" ] && [ -x auto/build ]
25then
26        Echo_message "Executing auto/build script."
27        ./auto/build "${@}"
28        exit ${?}
29fi
30
31if [ "${1}" = "noauto" ]
32then
33        shift
34fi
35
36# Setting static variables
37DESCRIPTION="$(Echo 'build a Debian Live system')"
38HELP=""
39USAGE="${PROGRAM} [--force]"
40
41Arguments "${@}"
42
43if [ ! -d config ]
44then
45        Echo_warning "No config/ directory; using defaults for all options"
46fi
47
48if [ "$(pwd)" = "/" ]
49then
50        Echo_error "Cannot build live image from the root directory (/)"
51        exit 1
52fi
53
54if echo $(pwd) | grep -qs " "
55then
56        Echo_error "Cannot build live image from a directory containing spaces"
57        exit 1
58fi
59
60# Reading configuration files
61Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
62Set_defaults
63
64# Checking defaults
65Check_defaults
66
67# Bootstrapping system
68lb bootstrap ${*}
69
70# Customizing chroot
71lb chroot ${*}
72
73# Building binary images
74lb binary ${*}
75
76# Building source images
77lb source ${*}
Note: See TracBrowser for help on using the repository browser.