5
url=http://www.hep.ph.ic.ac.uk/micedata/MICE/Step1/04200/${filename}
7
stagedir=${MAUS_THIRD_PARTY}/third_party/source/
8
stagefile=${stagedir}/${filename}
10
destdir=${MAUS_THIRD_PARTY}/third_party/install/share/${run}
11
destfile=${destdir}/${filename}
13
# the point of staging to third_party/source/ is that then this will get
14
# included in the release tarball (which pulls from third_party/source/)
16
if [ -n "${MAUS_THIRD_PARTY+x}" ]; then
18
if [ -e "${stagefile}" ]
20
echo "INFO: Found source archive"
22
echo "INFO: Source archive doesn't exist. Downloading..."
23
wget ${url} -O "${stagefile}"
27
echo "INFO: $destdir exists"
30
echo "INFO: making $destdir"
32
cp ${stagefile} ${destfile}
34
if [ -e "${destfile}" ]
36
echo "INFO: Unpacking"
41
echo "INFO: Checking md5sum"
42
md5sum -c ${run}.md5 || { echo "FATAL: Failed checksum"; rm "${destdir}"; exit 1; }
46
echo "INFO: Data for $run now available for testing against"
48
echo "FATAL: Failed to get the data file - giving up">&2
53
echo "FATAL: MAUS_THIRD_PARTY is not set" >&2