Merge branch 'master' of ssh://swordfish/srv/www/htdocs/git/engrid
[engrid.git] / src / scripts / nightly.bash
blobbd80ea94e4c7ca947f68fd763b7579c98f3d3fec
1 #!/usr/bin/env bash
3 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 # + +
5 # + This file is part of enGrid. +
6 # + +
7 # + Copyright 2008,2009 Oliver Gloth +
8 # + +
9 # + enGrid is free software: you can redistribute it and/or modify +
10 # + it under the terms of the GNU General Public License as published by +
11 # + the Free Software Foundation, either version 3 of the License, or +
12 # + (at your option) any later version. +
13 # + +
14 # + enGrid is distributed in the hope that it will be useful, +
15 # + but WITHOUT ANY WARRANTY; without even the implied warranty of +
16 # + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
17 # + GNU General Public License for more details. +
18 # + +
19 # + You should have received a copy of the GNU General Public License +
20 # + along with enGrid. If not, see <http:#www.gnu.org/licenses/>. +
21 # + +
22 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
24 # DESCRIPTION:
25 # This is a script run every night for several tasks: Documentation update, todo list generation, nightly builds, etc
26 # USAGE:
27 # This script must be run from the "engrid/src" directory.
29 set -x
31 RECIPIENTS='mtaverne ogloth'
33 #Create a nightly source tarball and put it on the FTP server
34 ./scripts/makedist.bash .. /srv/ftp/nightly
36 #Update online documentation
37 /usr/bin/doxygen Doxyfile
39 #Generate TODO lists
40 ./scripts/checkcomments.py *.h *.cxx *.cpp math/*.h > comments.mail
41 if [ -s comments.mail ]
42 then
43 mailx -s "ENGRID: comments" $RECIPIENTS < comments.mail
46 #test build
47 touch build.log
48 pwd
49 ./scripts/rebuild.sh 1>build.log 2>&1
50 if [ $? -ne 0 ]
51 then
52 echo "BUILD FAILED"
53 mailx -s "ENGRID: build test failed" $RECIPIENTS < ./build.log
54 else
55 echo "BUILD SUCCESSFUL"
56 mailx -s "ENGRID: build test successful" $RECIPIENTS < ./build.log
59 # copy nightly build into /opt/shared/bin/
60 cp -v ./engrid /opt/shared/bin/ || (echo mailx -s "failed to copy engrid into /opt/shared/bin/" $RECIPIENTS)