source: live-build/trunk/fuentes/scripts/build/lb_source_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.9 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 source tarball')"
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
32if ! In_list tar "${LB_SOURCE_IMAGES}"
33then
34        exit 0
35fi
36
37Echo_message "Begin building source tarball..."
38Echo_message "This may take a while."
39
40# Requiring stage file
41Require_stagefile .build/config .build/source_debian
42
43# Checking stage file
44Check_stagefile .build/source_tar
45
46# Checking lock file
47Check_lockfile .lock
48
49# Creating lock file
50Create_lockfile .lock
51
52# Remove old source
53rm -f source.debian.tar.bz2 source.debian.tar.gz source.debian.tar.lz source.debian.tar
54rm -f source.debian-live.tar.bz2 source.debian-live.tar.gz source.debian-live.tar.lz source.debian-live.tar
55
56tar cf source.debian.tar source/debian
57tar cf source.debian-live.tar source/debian-live
58
59case "${LB_COMPRESSION}" in
60        bzip2)
61                bzip2 ${BZIP2_OPTIONS} source.debian.tar
62                bzip2 ${BZIP2_OPTIONS} source.debian-live.tar
63                ;;
64
65        gzip)
66                gzip ${GZIP_OPTIONS} source.debian.tar
67                gzip ${GZIP_OPTIONS} source.debian-live.tar
68                ;;
69
70        lzip)
71                lzip ${LZIP_OPTIONS} source.debian.tar
72                lzip ${LZIP_OPTIONS} source.debian-live.tar
73                ;;
74
75        xz)
76                xz ${XZ_OPTIONS} source.debian.tar
77                xz ${XZ_OPTIONS} source.debian-live.tar
78                ;;
79
80        none)
81                ;;
82esac
83
84# Creating stage file
85Create_stagefile .build/source_tar
Note: See TracBrowser for help on using the repository browser.