Update "es" translation
[siplcs.git] / git-build.sh
blob2b8185831267d991ba61fc813b424930459e7b0b
1 #!/bin/sh
3 # Convenience to (re-)build pidgin-sipe from git repository.
5 # Example: add configure parameters
7 # $ ./git-build.sh --with-krb5
9 # Example: setup debug build, e.g. for valgrind ((ba)sh style)
11 # $ CFLAGS="-g -O0" ./git-build.sh
13 # Sanity check
14 if [ ! -x autogen.sh ]; then
15 echo 1>&2 "Your pidgin-sipe repository seems to be broken..."
16 exit 1;
19 # Check for previous build artifacts
20 rm -f build.log
21 if [ -r Makefile ]; then
22 echo "Cleaning up previous build artifacts..."
23 echo >build.log "------ Cleanup ------"
24 make >>build.log 2>&1 -k maintainer-clean
27 # Rebuild
29 set -e
30 echo -n "Configuring build with"
31 if [ $# -eq 0 ]; then
32 echo "out any options..."
33 else
34 echo " '$@'..."
36 echo >>build.log "------ Configure ------"
37 ./autogen.sh >>build.log 2>&1 "$@"
38 echo "Running build..."
39 echo >>build.log "------ Build ------"
40 make >>build.log 2>&1
42 if [ $? -eq 0 ]; then
43 echo >>build.log "------ SUCCESS ------"
44 echo "Congratulations: the build was successful!"
45 else
46 echo >>build.log "------ FAILED ------"
47 echo 1>&2 "Build FAILED!"
49 echo "Details can be found in 'build.log'."