-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathbuild.sh.example
More file actions
executable file
·29 lines (25 loc) · 890 Bytes
/
build.sh.example
File metadata and controls
executable file
·29 lines (25 loc) · 890 Bytes
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
#!/bin/bash -x
#
# Copy this file to build.sh so that gitbuilder can run it.
#
# What happens is that gitbuilder will checkout the revision of your software
# it wants to build in the directory called gitbuilder/build/. Then it
# does "cd build" and then "../build.sh" to run your script.
#
# You might want to run ./configure here, make, make test, etc.
#
# Don't forget to run autoconf and ./configure, if that's what your project
# needs.
[ ! -x autogen.sh ] || ./autogen.sh || exit 1
autoconf || true
[ ! -x configure ] || ./configure || exit 2
# Actually build the project
make || exit 3
# Only run the unit tests if the 'make test' target exists. Make will
# return 1 if a target exists but isn't up-to-date, or 2 on error.
make -q tests
if [ "$?" = 1 ]; then
# run "make test", but give it a time limit in case a test gets stuck
../maxtime 1800 make test || exit 4
fi
exit 0