~timrchavez/live-build/lb-sg-2.x-add-suppport-for-pxz

« back to all changes in this revision

Viewing changes to scripts/build/source_tar

  • Committer: Daniel Baumann
  • Date: 2011-03-09 18:17:15 UTC
  • Revision ID: daniel@debian.org-20110309181715-2s6s9tqa8xup5aep
Rearranging helpers scripts in source tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# lh_source_tar(1) - build source tarball
 
4
# Copyright (C) 2006-2010 Daniel Baumann <daniel@debian.org>
 
5
#
 
6
# live-helper 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
set -e
 
11
 
 
12
# Including common functions
 
13
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
 
14
 
 
15
# Setting static variables
 
16
DESCRIPTION="$(Echo 'build source tarball')"
 
17
HELP=""
 
18
USAGE="${PROGRAM} [--force]"
 
19
 
 
20
Arguments "${@}"
 
21
 
 
22
# Reading configuration files
 
23
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
 
24
Set_defaults
 
25
 
 
26
if [ "${LH_SOURCE}" != "true" ]
 
27
then
 
28
        exit 0
 
29
fi
 
30
 
 
31
if ! In_list tar "${LH_SOURCE_IMAGES}"
 
32
then
 
33
        exit 0
 
34
fi
 
35
 
 
36
Echo_message "Begin building source tarball..."
 
37
Echo_message "This may take a while."
 
38
 
 
39
# Requiring stage file
 
40
Require_stagefile .stage/config .stage/source_debian
 
41
 
 
42
# Checking stage file
 
43
Check_stagefile .stage/source_tar
 
44
 
 
45
# Checking lock file
 
46
Check_lockfile .lock
 
47
 
 
48
# Creating lock file
 
49
Create_lockfile .lock
 
50
 
 
51
# Remove old source
 
52
rm -f source.debian.tar.gz
 
53
rm -f source.debian-live.tar.gz
 
54
 
 
55
# Create tarballs
 
56
tar cf source.debian.tar source/debian
 
57
gzip ${GZIP_OPTIONS} source.debian.tar
 
58
 
 
59
tar cf source.debian-live.tar source/debian-live
 
60
gzip ${GZIP_OPTIONS} source.debian-live.tar
 
61
 
 
62
# Creating stage file
 
63
Create_stagefile .stage/source_tar