source: live-build/trunk/fuentes/scripts/build/lb_binary_tar @ 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: 1.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 harddisk binary 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 ! In_list tar "${LB_BINARY_IMAGES}"
28then
29        exit 0
30fi
31
32Echo_message "Begin building binary harddisk image..."
33
34# Requiring stage file
35Require_stagefile .build/config .build/bootstrap
36
37# Checking stage file
38Check_stagefile .build/binary_tar
39
40# Checking lock file
41Check_lockfile .lock
42
43# Creating lock file
44Create_lockfile .lock
45
46# Remove old binary
47rm -f binary.tar.bz2 binary.tar.gz binary.tar.lz binary.tar
48
49tar cf binary-tar.tar binary
50
51case "${LB_COMPRESSION}" in
52        bzip2)
53                bzip2 ${BZIP2_OPTIONS} binary-tar.tar
54                ;;
55
56        gzip)
57                gzip ${GZIP_OPTIONS} binary-tar.tar
58                ;;
59
60        lzip)
61                lzip ${LZIP_OPTIONS} binary-tar.tar
62                ;;
63
64        xz)
65                xz ${XZ_OPTIONS} binary-tar.tar
66                ;;
67
68        none)
69                ;;
70esac
71
72# Creating stage file
73Create_stagefile .build/binary_tar
Note: See TracBrowser for help on using the repository browser.