updated to modern VTK
[engrid-github.git] / src / scripts / nightly.bash
blob6231b8fcce6dd502f074701b52d002fe81e01e3b
1 #!/usr/bin/env bash
2 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 # + +
4 # + This file is part of enGrid. +
5 # + +
6 # + Copyright 2008-2014 enGits GmbH +
7 # + +
8 # + enGrid is free software: you can redistribute it and/or modify +
9 # + it under the terms of the GNU General Public License as published by +
10 # + the Free Software Foundation, either version 3 of the License, or +
11 # + (at your option) any later version. +
12 # + +
13 # + enGrid is distributed in the hope that it will be useful, +
14 # + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 # + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 # + GNU General Public License for more details. +
17 # + +
18 # + You should have received a copy of the GNU General Public License +
19 # + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
20 # + +
21 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23 set -x
25 RECIPIENTS='mtaverne@engits.com ogloth@engits.com'
27 NIGHTLYDIR=/var/www/ftp/nightly
29 #Create a nightly source tarball and put it on the FTP server
30 ./scripts/makedist.bash .. $NIGHTLYDIR
32 #Update online documentation
33 /opt/shared/alternatives/bin/doxygen
34 #/usr/bin/doxygen Doxyfile
36 #Generate TODO lists
37 ./scripts/checkcomments.py *.h *.cxx *.cpp math/*.h > comments.mail
38 if [ -s comments.mail ]
39 then
40 mailx -s "ENGRID: comments" $RECIPIENTS < comments.mail
43 #test build
44 touch build.log
45 pwd
46 ./scripts/rebuild.sh 1>build.log 2>&1
47 if [ $? -ne 0 ]
48 then
49 echo "BUILD FAILED"
50 mailx -s "ENGRID: build test failed" $RECIPIENTS < ./build.log
51 else
52 echo "BUILD SUCCESSFUL"
53 mailx -s "ENGRID: build test successful" $RECIPIENTS < ./build.log
56 # copy nightly build into nightly build directory
57 DATE=$(date +%Y%m%d_%H%M%S)
58 cp -v ./engrid "$NIGHTLYDIR/engrid_$DATE" || (echo mailx -s "failed to copy engrid into $NIGHTLYDIR" $RECIPIENTS)