Debian Codegraph @

utils/kannel-nag

raw
1 #!/bin/bash
2 #
3 # kannel-nag - do a test compile of Kannel and mail results to devel list
4 #
5 # This script is meant to compile Kannel and mail all warnings and errors
6 # to the development list. It is meant to be run on a few carefully chosen
7 # machines, not by everyone on the Internet. The goal is to make sure Kannel
8 # at least compiles on many platforms. It is quite uninteresting to have
9 # fiftyseven thousand people running this script on identical Linux machines.
10 #
11 # I repeat: DO NOT RUN THIS SCRIPT without asking for permission of the
12 # receiver first.
13 #
14 # TODO:
15 # - CFLAGS now set for GCC, should be more portable
16 #
17 # Lars Wirzenius <[email protected]>
18 #
19
20 set -e
21
22 addr=""
23 CVSROOT=":pserver:[email protected]:/home/cvs"
24
25 dir="kannel-nag-dir"
26
27 cd /var/tmp
28 rm -rf $dir
29 mkdir $dir
30 cd $dir
31 cvs -Q -d$CVSROOT co gateway
32 cd gateway
33 if CFLAGS='-Wall -O2 -g' ./configure >config.output 2>&1
34 then
35 configure=ok
36 touch .depend || true
37 make -s depend || true
38 make -s >make.output 2>&1 || true
39 else
40 configure=failed
41 fi
42
43 if test -s make.output || [ "$configure" = failed ]
44 then
45 (
46 echo "Kannel compilation test."
47 echo ""
48 echo "Host: `uname -a`"
49 echo ""
50 echo "Kannel compilation had warnings or failed."
51 echo ""
52 if test -e make.output
53 then
54 echo "Output of 'make -s':"
55 cat make.output
56 echo "-------------------------------------------------------"
57 echo ""
58 fi
59 echo "Output of 'CFLAGS='-Wall -O2 -g' ./configure':"
60 cat config.output
61 ) | mail -s "Kannel automatic compilation test for `uname -s`" $addr
62 fi
63
64 cd /var/tmp
65 rm -rf $dir