4
#Location of HG repository to open
11
ABORT_MSG_FILE=NOTE_ABORT
13
#Number of simultaneous processes when building
18
echo `cat $ABORT_MSG_FILE`
19
#TODO: Do we have a reliable SMTP system that we know how to use??
24
echo "$CHECKOUT_PATH may need to be removed before re-running this script"
28
#-- Check variables are set --
29
# TODO: This is not neat, but I don't have internet and don't think
30
# we can loop over empty items.
32
if [ x$REPOSITORY_PATH == x"" ] ; then
35
if [ x$CHECKOUT_PATH == x"" ] ; then
38
if [ x$BINARY == x"" ] ; then
41
if [ x$PROJECTNAME == x"" ] ; then
44
if [ $NOTCONFIGURED -ne 0 ] ; then
45
echo "PATHS NOT CONFIGURED -- CONFIGUREPATHS FIRST, THEN DELETE THIS ERROR MESSAGE"
50
if [ x`which hg` == x"" ] ; then
51
echo "hg binary not available in $PATH. Aborting" > $ABORT_MSG_FILE
55
if [ -d $CHECKOUT_PATH ] ; then
56
echo "target destination for checkout ($CHECKOUT_PATH) not empty!" > $ABORT_MSG_FILE
60
mkdir -p $CHECKOUT_PATH
64
hg clone $REPOSITORY_PATH
66
if [ $? -ne 0 ] ; then
67
echo "repository checkout failed!" > $ABORT_MSG_FILE
71
if [ ! -d $PROJECTNAME ] ; then
72
echo "Odd, 3depict checked out, but no code dir found" > $ABORT_MSG_FILE
78
#Initiate the configuration
79
./configure --enable-debug-checks --enable-openmp-parallel
81
if [ $? -ne 0 ] ; then
82
echo "Configure failed!" > $ABORT_MSG_FILE
88
if [ $? -ne 0 ] ; then
89
echo "Build failed" > $ABORT_MSG_FILE
93
if [ ! -f $BINARY ] ; then
94
echo "Weird, binary is missing!" > $ABORT_MSG_FILE
101
if [ $? -ne 0 ] ; then
102
echo "Unit test failure! Fix it Fix it Fix it! Fix it! " > $ABORT_MSG_FILE
107
rm -rf $CHECKOUT_PATH