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

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

add original source

  • Property svn:executable set to *
File size: 2.4 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 'build iso source image')"
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_SOURCE}" != "true" ]
28then
29        exit 0
30fi
31
32case "${LB_SOURCE_IMAGES}" in
33        iso*)
34                ;;
35
36        *)
37                exit 0
38                ;;
39esac
40
41Echo_message "Begin building source iso image..."
42
43# Requiring stage file
44Require_stagefile .build/config .build/source_debian
45
46# Checking stage file
47Check_stagefile .build/source_iso
48
49# Checking lock file
50Check_lockfile .lock
51
52# Creating lock file
53Create_lockfile .lock
54
55# Checking depends
56Check_package chroot/usr/bin/genisoimage genisoimage
57
58# Installing depends
59Install_package
60
61# Remove old iso image
62if [ -f source.iso ]
63then
64        rm -f source.iso
65fi
66
67if [ "${_QUIET}" = "true" ]
68then
69        GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -quiet"
70fi
71
72if [ "${_VERBOSE}" = "true" ]
73then
74        GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -v"
75fi
76
77if [ -n "${LB_ISO_APPLICATION}" ] && [ "${LB_ISO_APPLICATION}" != "none" ]
78then
79        GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -A \"${LB_ISO_APPLICATION}\""
80fi
81
82if [ -n "${LB_ISO_PREPARER}" ] && [ "${LB_ISO_PREPARER}" != "none" ]
83then
84        GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -p \"${LB_ISO_PREPARER}\""
85fi
86
87if [ -n "${LB_ISO_PUBLISHER}" ] && [ "${LB_ISO_PUBLISHER}" != "none" ]
88then
89        GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -publisher \"${LB_ISO_PUBLISHER}\""
90fi
91
92if [ -n "${LB_ISO_VOLUME}" ] && [ "${LB_ISO_VOLUME}" != "none" ]
93then
94        GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -V \"${LB_ISO_VOLUME}\""
95fi
96
97# Moving image
98mv source chroot
99
100cat >> chroot/source.sh << EOF
101genisoimage ${GENISOIMAGE_OPTIONS} -o source.iso -r -J -l -cache-inodes source
102EOF
103
104Chroot chroot "sh source.sh"
105
106# Move image
107mv chroot/source chroot/source.iso ./
108rm -f chroot/source.sh
109
110# Removing depends
111Remove_package
112
113# Creating stage file
114Create_stagefile .build/source_iso
Note: See TracBrowser for help on using the repository browser.