forked from SoundScapeRenderer/ssr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·45 lines (33 loc) · 1.1 KB
/
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
#!/bin/sh
# This script automates the necessary steps for releasing the SSR.
run_command()
{
# show message; run command; if unsuccessful, show error message and exit
echo $0: Running \"$@\" ...
"$@" || { status=$?; echo $0: Error in \"$@\"!; exit $status; }
}
# change to the directory where the script is located
# (in case it was started from somewhere else)
cd $(dirname $0)
if [ "$(git symbolic-ref --short HEAD)" != master ]
then
echo \"$0\" should be called on the master branch!; exit 42;
fi
# first of all, make "tabula rasa"
run_command ./cleanse.sh
# prepare the build system
run_command ./autogen.sh
# create the user manual
(cd doc/manual && run_command make latexpdf) || exit
# prepare Makefiles
run_command ./configure
# enable parallel make if CONCURRENCY_LEVEL is defined
if test ! -z $CONCURRENCY_LEVEL; then
MAKE_OPTIONS=-j$CONCURRENCY_LEVEL
fi
# this must be run first, because "make distcheck" needs the executables to
# generate the man pages with help2man:
run_command make $MAKE_OPTIONS
# create tarball and run some basic tests
run_command make distcheck $MAKE_OPTIONS
echo $0: Done!