no good reason to require glib 1.3.15 so back to 1.3.12 put version checking for...
[platform/upstream/gstreamer.git] / scripts / gstcvstest.sh
1 #!/bin/bash
2 # gstreamer auto-builder
3 # 0.1.0
4 # thomas@apestaart.org
5 # check out fresh gstreamer cvs code anonymously, configure, build
6
7 # FIXME :
8 # * check out source twice, compare, to make sure we don't get code
9 #   in between commits
10 # * add rpm building if allowed
11 # * maybe change dir where stuff gets built ?
12
13
14 BR=/tmp         # build root
15 export DISPLAY=:0.0 # gtk-scandoc needs an X server
16
17 # delete logs
18 rm -rf $BR/*.log
19
20 echo -n "+ Starting on "
21 date
22 echo -n "+ "
23 uname -a
24 # delete gstreamer dir if it exists
25 if test -e $BR/gstreamer
26 then
27   echo "+ Deleting $BR/gstreamer"
28   chmod u+rwx -R /tmp/gstreamer
29   rm -rf $BR/gstreamer
30 fi
31
32 cd $BR
33
34 # check out
35 echo "+ Checking out source code"
36 cvs -z3 -d:pserver:anonymous@cvs.gstreamer.sourceforge.net:/cvsroot/gstreamer co gstreamer > cvs.log 2>&1
37
38 # do your thing
39 cd gstreamer
40
41 # autogen
42 echo "+ Running ./autogen.sh"
43 ./autogen.sh  > ../autogen.log 2>&1
44 if test $? -ne 0
45 then
46   echo "- Problem while running autogen.sh"
47   echo "- Dumping end of log ..."
48   echo
49   tail -n 20 ../autogen.log
50   exit
51 fi
52
53 echo "+ Running ./configure --enable-docs-build=no"
54 ./configure --enable-docs-build=no > ../configure.log 2>&1
55 if test $? -ne 0
56 then
57   echo "- Problem while running configure"
58   echo "- Dumping end of log ..."
59   echo
60   tail -n 20 ../configure.log
61   exit
62 fi
63
64 # make
65 echo "+ Running make"
66 make > ../make.log 2>&1
67 if test $? -ne 0
68 then
69   echo "- Problem while running make"
70   echo "- Dumping end of log ..."
71   echo
72   grep -v "pasting would not give a valid" ../make.log > ../make.scrubbed.log
73   tail -n 20 ../make.scrubbed.log
74   exit
75 fi
76
77 echo "+ Running BUILD_DOCS= make distcheck"
78 BUILD_DOCS= make distcheck > ../makedistcheck.log 2>&1
79 if test $? -ne 0
80 then
81   echo "- Problem while running make distcheck"
82   echo "- Dumping end of log ..."
83   echo
84   tail -n 20 ../makedistcheck.log
85   exit
86 fi
87
88 echo -n "+ Ending successful build cycle on "
89 date