forked from VMML/vmmlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pack_release.sh
70 lines (51 loc) · 1.26 KB
/
pack_release.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
#
# @author Susanne Suter
if [ -z "$1" ]; then
echo "usage: ./"$0" [release-tag]";
exit 1;
fi
export EXCLUDING_PATTERN="*.sw* *.svn* *.DS_Store* *.o*"
export INCLUDE_DIR="include/vmmlib"
export TESTS_DIR="tests"
export README_FILES="README AUTHORS LICENSE.txt ACKNOWLEDGEMENTS"
export PROJECT_FILES="vmmlib.xcodeproj Makefile Makefile.atlas CMakeLists.txt"
export RELEASE_NUM=$1
echo "finished init"
################
# ZIP CREATION #
################
zip_release() {
# zipping the include and test files excluding VIM
# swap files and SVN directories
zip -x ${EXCLUDING_PATTERN} \
-r ../vmmlib-${RELEASE_NUM}.zip \
${INCLUDE_DIR} \
${TESTS_DIR} \
${README_FILES} \
${PROJECT_FILES}
}
################
# TGZ CREATION #
################
tgz_release() {
# tar gzipping the include and test files excluding VIM
# swap files and SVN directories
tar cvfz \
../vmmlib-${RELEASE_NUM}.tgz \
--exclude="*.o" \
--exclude="*.DS_Store" \
--exclude="*.svn*" \
--transform "s|^|vmmlib-${RELEASE_NUM}/|" \
${INCLUDE_DIR} \
${TESTS_DIR} \
${README_FILES} \
${PROJECT_FILES}
}
##########
# CALLS ##
##########
zip_release
echo "finished zipping"
tgz_release
echo "finished tgzipping"