-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbootstrap
executable file
·73 lines (64 loc) · 1.74 KB
/
bootstrap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env bash
URL="http://stout.crest.iu.edu/hpx"
DIR=$(mktemp -d "${TMPDIR:-/tmp}"/hpx.XXXXXXX)
CONTRIB=contrib
# set the array of tarball deps here
contrib_tars=(
"photon-1.1.tar.bz2"
"libcuckoo-2.0.tar.gz"
"jemalloc-4.5.0.tar.bz2"
"libffi-e9de7e3.tar.gz"
"userspace-rcu-0.9.2-hpx.tar.bz2"
"hwloc-1.11.4.tar.bz2"
)
# set matching md5sums for each tarball
contrib_md5=(
"c019f67c8961381dd496df944f0dce8a" # photon
"cd7e27b0ede1db1f6594c968d21f8b83" # libcukoo
"025108f7a76080f830775ff36256b7dd" # jemalloc
"c3f381d8fd2fd611b472fb4971c4f546" # libffi
"845da9bd258170becca07fe9ef4c7940" # liburcu
"865d3dfba3c173f66905c4301dfc7d73" # hwloc
)
# and matching target contrib directories
contrib_dirs=(
"photon"
"libcuckoo"
"jemalloc"
"libffi"
"userspace-rcu"
"hwloc"
)
# set the command to fetch the tarballs
CMD="wget --quiet -O"
if ! type "wget" > /dev/null; then
CMD="curl --silent -o"
fi
echo -n "Downloading and extracting contrib tarballs..."
for ((i=0; i<${#contrib_tars[@]}; i++)); do
dir=${contrib_dirs[$i]}
file=${contrib_tars[$i]}
md5=${contrib_md5[$i]}
if [ -f ${CONTRIB}/$dir/.md5 ]; then
omd5=`cat ${CONTRIB}/$dir/.md5`
else
omd5=""
fi
if [ ! -f ${CONTRIB}/$dir/configure ] || [ ! "$omd5" == "$md5" ]; then
echo -n "$dir..."
$CMD ${DIR}/$file ${URL}/$dir/$md5/$file
if [ $? -ne 0 ]; then
echo
echo "!!! Error downloading $dir contrib with md5sum $md5"
continue
fi
mkdir -p ${CONTRIB}/$dir
tar --strip-components=1 -xf ${DIR}/$file -C ${CONTRIB}/$dir
echo -n $md5 > ${CONTRIB}/$dir/.md5
fi
done
rm -rf ${DIR}
echo "DONE"
set -e
autoreconf --force --install -I config || exit 1
rm -rf autom4te.cache