forked from m2osw/csspp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpack
More file actions
executable file
·92 lines (84 loc) · 2.88 KB
/
pack
File metadata and controls
executable file
·92 lines (84 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
#
# File:
# dev/pack
#
# Description:
# A shell script used to generate the source package with all the
# Snap! Websites dependencies (which are all in one at this point.)
#
# Documentation:
# This script is currently considered internal and is not directly
# documented. It may be useful to you, although it is likely that
# it won't be.
#
# License:
# csspp -- a CSS Preprocessor
# Copyright (c) 2015-2019 Made to Order Software Corp. All Rights Reserved
#
# https://snapwebsites.org/project/csspp
# contact@m2osw.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
set -e
SOURCE_REPO=../../../sources-repo
if ! test -d $SOURCE_REPO
then
echo "To use this script, we expect you to have a directory named"
echo "sources-repo, which is a pristine copy of the git repository."
echo "Create that directory like any other git repository and place"
echo "it in the parent of the csspp directory. The script will update"
echo "the files on each run."
exit 1
fi
# Get both versions
. dev/version
DEBIAN_VERSION=`dpkg-parsechangelog --show-field Version | sed -e s/~.*// -e s/\.0$//`
if test "$FULL_VERSION" != "$DEBIAN_VERSION"
then
echo "error: CMakeLists.txt says version $FULL_VERSION and the changelog"
echo "error: says $DEBIAN_VERSION instead. Please fix and try again."
exit 1;
fi
cd $SOURCE_REPO
mkdir -p ../packages
git pull origin master
rm -f snapcmakemodules_*.tar.gz advgetopt_*.tar.gz csspp_*.tar.gz
dpkg-source -b cmake
cp snapcmakemodules_*.tar.gz ../packages
cd contrib
dpkg-source -b advgetopt
dpkg-source -b csspp
cp advgetopt_*.tar.gz csspp_*.tar.gz ../../packages
cd ../..
rm -rf tmp/csspp
mkdir -p tmp/csspp
cd tmp/csspp
tar xf ../../sources-repo/snapcmakemodules_*.tar.gz
tar xf ../../sources-repo/contrib/advgetopt_*.tar.gz
tar xf ../../sources-repo/contrib/csspp_*.tar.gz
cp csspp/dev/MasterCMakeLists.txt CMakeLists.txt
cp csspp/dev/INSTALL INSTALL
cd csspp
VERSION=`dpkg-parsechangelog --show-field Version`
cd ../..
tar czf csspp_${VERSION}.tar.gz csspp
cp csspp_${VERSION}.tar.gz ../packages/csspp-all_${VERSION}.tar.gz
# Local Variables:
# indent-tabs-mode: nil
# tab-width: 4
# End:
# vim: ts=4 sw=4 et