-
Notifications
You must be signed in to change notification settings - Fork 8
/
build_all.sh
executable file
·65 lines (56 loc) · 1.42 KB
/
build_all.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
#!/bin/bash
#
# Convenience script to create the official build of Tao3D
# When done, packages are copied into .. (parent directory).
#
# Usage: ./build_all.sh
#
# *****************************************************************************
# This software is licensed under the GNU General Public License v3
# See file COPYING for details.
# (C) 2012 Jerome Forissier <jerome@taodyne.com>
# (C) 2012 Taodyne SAS
# *****************************************************************************
doo() {
echo "$@" >&4
eval "$@"
}
cp_kit() {
case `uname` in
Darwin)
doo mv "packaging/macosx/*.dmg" builds/
;;
MINGW*)
doo mv "packaging/win/*.exe" builds/
;;
Linux)
doo mv packaging/linux/*.deb packaging/linux/*.tar.bz2 builds/
;;
esac
}
die() {
echo $1 >&2
exit 1
}
set_mflags() {
case `uname` in
MINGW*)
CCACHE=$(which ccache)
[ "$CCACHE" ] && MAKEFLAGS="CXX=\"ccache g++\" CC=\"ccache gcc\""
;;
esac
}
mkdir -p builds/
git diff-index --quiet HEAD -- || die "Error: Git work area is dirty."
set_mflags
LOG="$PWD/builds/taobuild-$(date +%H:%M:%S-%Y.%m.%d).log"
echo Log file: $LOG >&2
exec 4>&2
{ time {
doo make distclean
doo ./configure --with-eula player && doo "make -j3 kit $MAKEFLAGS" && cp_kit
[ $? -ne 0 ] && exit $?
doo make distclean
doo ./configure --with-eula --with-cfu && doo "make -j3 kit $MAKEFLAGS" && cp_kit
} >"$LOG" 2>&1; }
exec 4>&-