forked from cvmfs/cvmfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·75 lines (64 loc) · 1.81 KB
/
bootstrap.sh
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
74
75
#!/bin/sh
CARES_VERSION=1.9.1
CURL_VERSION=7.27.0
ZLIB_VERSION=1.2.7
SPARSEHASH_VERSION=1.12
LEVELDB_VERSION=1.5.0
# put the extracted stuff out of source for compilation (location given by cmake)
outOfSource=$1
# check if bootstrapping already happened
if [ -f "$outOfSource/.decompressionDone" ]; then
exit 0
fi
# C-ARES
cd externals/c-ares
tar xvfz c-ares-${CARES_VERSION}.tar.gz
mkdir -p "$outOfSource/c-ares/src"
mv c-ares-${CARES_VERSION}/* "$outOfSource/c-ares/src"
cp src/* "$outOfSource/c-ares/src"
rm -rf c-ares-${CARES_VERSION}
cd ../..
# CURL
cd externals/libcurl
tar xfz curl-${CURL_VERSION}.tar.gz
mkdir -p "$outOfSource/libcurl/src"
mv curl-${CURL_VERSION}/* "$outOfSource/libcurl/src"
cp src/* "$outOfSource/libcurl/src"
rm -rf curl-${CURL_VERSION}
cd ../..
# Zlib
cd externals/zlib
tar xfz zlib-${ZLIB_VERSION}.tar.gz
mkdir -p "$outOfSource/zlib/src"
mv zlib-${ZLIB_VERSION}/* "$outOfSource/zlib/src"
cp src/* "$outOfSource/zlib/src"
rm -rf zlib-${ZLIB_VERSION}
cd ../..
# sqlite3
cd externals/sqlite3
mkdir -p "$outOfSource/sqlite3/src"
cp src/* "$outOfSource/sqlite3/src"
cd ../..
# Murmur
cd externals/murmur
mkdir -p "$outOfSource/murmur/src"
cp src/* "$outOfSource/murmur/src"
cd ../..
# google sparse hash
cd externals/sparsehash
tar xfz sparsehash-${SPARSEHASH_VERSION}.tar.gz
mkdir -p "$outOfSource/sparsehash/src"
mv sparsehash-${SPARSEHASH_VERSION}/* "$outOfSource/sparsehash/src"
cp src/* "$outOfSource/sparsehash/src"
rm -rf sparsehash-${SPARSEHASH_VERSION}
cd ../..
# leveldb
cd externals/leveldb
tar xvfz leveldb-${LEVELDB_VERSION}.tar.gz
mkdir -p "$outOfSource/leveldb/src"
mv leveldb-${LEVELDB_VERSION}/* "$outOfSource/leveldb/src"
cp src/* "$outOfSource/leveldb/src"
rm -rf leveldb-${LEVELDB_VERSION}
cd ../..
# create a hint that bootstrapping is already done
touch "$outOfSource/.decompressionDone"