-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_tar.sh
53 lines (43 loc) · 1.46 KB
/
build_tar.sh
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
#!/bin/bash
set -e
# The first and one and only argument must be the version number.
if test $# -ne 1;
then
echo "+++ Usage: build_tar.sh <version>"
exit 1
fi
PACKAGE_NAME=rmtoo-$1
# Create requirments dependency graph and PDF.
make clean
make all
# Temporary store documents in an own directory: a make clean will
# remove them - but we need it.
rm -fr ttt
mkdir ttt
mv artifacts/requirements.pdf ttt
mv artifacts/req-graph1.png artifacts/req-graph2.png ttt
# Clean up everything before copying into the tar ball directory.
make clean
mkdir -p package/${PACKAGE_NAME}
for d in bin COPYING doc gpl-3.0.txt rmtoo setenv.sh Readme-GitPython.txt Readme-Hacking.txt Readme-OS-X.txt Readme-Overview.txt Readme-RmtooOnRmtoo.txt Readme.txt Readme-Windows.txt Makefile contrib
do
cp -r $d package/${PACKAGE_NAME}
done
# The picture and the pdf are delivered seperatly
# mv ttt/* package/${PACKAGE_NAME}/doc
# Do not deliver emacs backup files
find package/${PACKAGE_NAME} -name "*~" | xargs rm -f
# Do not deliver compiled python files
find package/${PACKAGE_NAME} -name "*.pyc" | xargs rm -f
# Also remove the presentation (will be delivered seperatly)
rm -fr package/${PACKAGE_NAME}/doc/presentations
# Create the artifacts directory (used when rmtoo itself if build)
mkdir -p package/${PACKAGE_NAME}/artifacts
# Create tag ball
(cd package
tar -cf ${PACKAGE_NAME}.tar ${PACKAGE_NAME}
gzip -9 ${PACKAGE_NAME}.tar
)
mv package/${PACKAGE_NAME}.tar.gz .
# Clean up
rm -fr package ttt