~chris-rogers/maus/emr_mc_digitization

« back to all changes in this revision

Viewing changes to third_party/bash/55doxygen.bash

  • Committer: Chris Rogers
  • Date: 2014-04-16 11:48:45 UTC
  • mfrom: (707 merge)
  • mto: This revision was merged to the branch mainline in revision 711.
  • Revision ID: chris.rogers@stfc.ac.uk-20140416114845-h3u3q7pdcxkxvovs
Update to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env bash
 
2
#directory=doxygen-1.8.7
 
3
#filename=${directory}.src.tar.gz 
 
4
#url=ftp://ftp.stack.nl/pub/users/dimitri/${filename}
 
5
 
 
6
# Using a locally hosted version of doxygen because an error that causes segfaults when
 
7
# compiling the documentation is not yet fixed in the current release version.
 
8
# When 1.8.7 comes out, the lines above can be used instead of the ones below.
 
9
# The Git-Hash of the currently used version is 09a5fc198a98d697d3e50c1c76392b8373f1af12
 
10
 
 
11
directory=doxygen-1.8.6.1
 
12
filename=${directory}.src.tar.gz 
 
13
url=http://micewww.pp.rl.ac.uk/attachments/1882/${filename}
 
14
 
 
15
if [ -n "${MAUS_ROOT_DIR+x}" ]; then
 
16
 
 
17
    if [ -e "${MAUS_ROOT_DIR}/third_party/source/${filename}" ]
 
18
    then
 
19
        echo "INFO: Found source archive in 'source' directory"
 
20
    else  
 
21
        echo "INFO: Source archive doesn't exist.  Downloading..."
 
22
 
 
23
        wget --directory-prefix=${MAUS_ROOT_DIR}/third_party/source ${url}
 
24
 
 
25
    fi
 
26
   
 
27
    if [ -e "${MAUS_ROOT_DIR}/third_party/source/${filename}" ]
 
28
    then
 
29
        echo "INFO: Source archive exists."
 
30
        echo
 
31
        echo "INFO: Checking MD5 checksum (otherwise the file didn't"
 
32
        echo "INFO: download properly):"
 
33
        echo
 
34
        cd ${MAUS_ROOT_DIR}/third_party/source
 
35
        md5sum -c ${filename}.md5 || { echo "FATAL: Failed to download:" >&2; echo "FATAL: ${filename}." >&2; echo "FATAL: MD5 checksum failed.">&2; echo "FATAL: Try rerunning this command to redownload, or check" >&2; echo "FATAL: internet connection"  >&2; rm -f ${filename}; exit 1; }
 
36
        sleep 1
 
37
        echo
 
38
        echo "INFO: Unpacking:"
 
39
        echo
 
40
        rm -Rf ${MAUS_ROOT_DIR}/third_party/build/${directory}
 
41
        sleep 1
 
42
        tar xvfz ${MAUS_ROOT_DIR}/third_party/source/${filename} -C ${MAUS_ROOT_DIR}/third_party/build > /dev/null
 
43
        cd ${MAUS_ROOT_DIR}/third_party/build/${directory}
 
44
        echo "INFO: Configuring:"
 
45
        sleep 1
 
46
        ./configure --prefix ${MAUS_ROOT_DIR}/third_party/install
 
47
        echo
 
48
        echo "INFO: Making:"
 
49
        echo
 
50
        sleep 1
 
51
        make
 
52
        make install
 
53
                    ################################################## 
 
54
        echo
 
55
        echo "INFO: The package should be locally build now in your"
 
56
        echo "INFO: third_party directory, which the rest of MAUS will"
 
57
        echo "INFO: find."
 
58
    else
 
59
        echo "FATAL: Source archive still doesn't exist.  Please file a bug report with your operating system,">&2
 
60
        echo "FATAL: distribution, and any other useful information at:" >&2
 
61
        echo "FATAL: " >&2
 
62
        echo "FATAL: http://micewww.pp.rl.ac.uk:8080/projects/maus/issues/" >&2
 
63
        echo "FATAL:" >&2
 
64
        echo "FATAL: Giving up, sorry..." >&2
 
65
        exit 1
 
66
    fi
 
67
  
 
68
else         ################################################## 
 
69
echo
 
70
echo "FATAL: MAUS_ROOT_DIR is not set, which is required to" >&2  
 
71
echo "FATAL: know where to install this package.  You have two" >&2 
 
72
echo "FATAL: options:" >&2
 
73
echo "FATAL:" >&2
 
74
echo "FATAL: 1. Set the MAUS_ROOT_DIR from the command line by" >&2 
 
75
echo "FATAL: (if XXX is the directory where MAUS is installed):" >&2
 
76
echo "FATAL:" >&2 
 
77
echo "FATAL:        MAUS_ROOT_DIR=XXX ${0}" >&2
 
78
echo "FATAL:" >&2
 
79
echo "FATAL: 2. Run the './configure' script in the MAUS ROOT" >&2 
 
80
echo "FATAL: directory, run 'source env.sh' then rerun this" >&2  
 
81
echo "FATAL: command ">&2
 
82
exit 1
 
83
fi
 
84
 
 
85
# This is the maximum length of text (ignoring whitespace), 50 chars
 
86
##################################################
 
87
# this is the maximum amount of characters (including whitespace) per line)
 
88
######################################################################