~chris-rogers/maus/emr_mc_digitization

« back to all changes in this revision

Viewing changes to third_party/bash/70daq.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
1
#!/usr/bin/env bash
2
2
 
3
3
version=0.3.2
4
 
filename=monitor_test.tar
5
4
directory=daq-${version}
6
 
url=http://micewww.pp.rl.ac.uk/attachments/1187/monitor_test.tar
 
5
 
 
6
#filename=monitor_test.tar
 
7
#url=http://micewww.pp.rl.ac.uk/attachments/1187/monitor_test.tar
 
8
 
 
9
filename=libmonitor.tarz
 
10
url=http://dpnc.unige.ch/~yordan/libmonitor.tarz
7
11
 
8
12
if [ -n "${MAUS_ROOT_DIR+x}" ]; then
9
13
 
10
 
    if [ -e "${MAUS_ROOT_DIR}/third_party/source/${filename}" ]
 
14
    if [ -e "${MAUS_ROOT_DIR}/third_party/source/${filename}" ] &&
 
15
       [ -e "${MAUS_ROOT_DIR}/third_party/source/${filename}.md5" ]
11
16
    then
12
17
        echo "INFO: Found source archive in 'source' directory"
13
18
    else
14
19
        echo "INFO: Source archive doesn't exist.  Downloading..."
 
20
        rm -f "${MAUS_ROOT_DIR}/third_party/source/${filename}"
 
21
        rm -f "${MAUS_ROOT_DIR}/third_party/source/${filename}.md5"
15
22
 
16
23
        wget --directory-prefix="${MAUS_ROOT_DIR}/third_party/source" ${url}
 
24
        wget --directory-prefix="${MAUS_ROOT_DIR}/third_party/source" ${url}.md5
17
25
 
18
26
    fi
19
27
 
20
 
    if [ -e "${MAUS_ROOT_DIR}/third_party/source/${filename}" ]
 
28
    if [ -e "${MAUS_ROOT_DIR}/third_party/source/${filename}" ] &&
 
29
       [ -e "${MAUS_ROOT_DIR}/third_party/source/${filename}.md5" ]
21
30
    then
22
31
        echo "INFO: Source archive exists."
23
32
        echo
39
48
        #sleep 1
40
49
        #scons install
41
50
 
42
 
        cp "${MAUS_ROOT_DIR}/third_party/build/${directory}/montest/libMDMonitor.a" "${MAUS_ROOT_DIR}/third_party/install/lib"
 
51
        cp "${MAUS_ROOT_DIR}/third_party/build/${directory}/libMDMonitor.a" "${MAUS_ROOT_DIR}/third_party/install/lib"
43
52
        #cat MDmonitoring.hh |sed "s;#include \"monitor.h\";//#include \"monitor.h\";" | sed "s;#include \"event.h\";//#include \"event.h\";" > tmp.hh
44
53
        #mv tmp.hh MDmonitoring.hh
45
 
        cp "${MAUS_ROOT_DIR}/third_party/build/${directory}/montest/event.h" "${MAUS_ROOT_DIR}/third_party/install/include/daq"
46
 
        cp "${MAUS_ROOT_DIR}/third_party/build/${directory}/montest/monitor.h" "${MAUS_ROOT_DIR}/third_party/install/include/daq"
47
 
        cp "${MAUS_ROOT_DIR}/third_party/build/${directory}/montest/MDmonitoring.hh" "${MAUS_ROOT_DIR}/third_party/install/include/daq"
 
54
        cp "${MAUS_ROOT_DIR}/third_party/build/${directory}/event.h" "${MAUS_ROOT_DIR}/third_party/install/include/daq"
 
55
        cp "${MAUS_ROOT_DIR}/third_party/build/${directory}/monitor.h" "${MAUS_ROOT_DIR}/third_party/install/include/daq"
 
56
        cp "${MAUS_ROOT_DIR}/third_party/build/${directory}/MDmonitoring.hh" "${MAUS_ROOT_DIR}/third_party/install/include/daq"
48
57
        #cd -
49
58
        #rm -Rf "${MAUS_ROOT_DIR}/third_party/build/${directory}"
50
59
        echo
75
84
echo "FATAL: directory, run 'source env.sh' then rerun this" >&2
76
85
echo "FATAL: command ">&2
77
86
exit 1
78
 
fi
 
 
b'\\ No newline at end of file'
 
87
fi