forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ios-install-third-party.sh
executable file
·40 lines (30 loc) · 1.17 KB
/
ios-install-third-party.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
#!/bin/bash
#boostdir="`node ./node_modules/boost-lib/bin/boost-lib download -V 1.57`"
#cd "$boostdir"
#./bootstrap.sh
#./b2 headers
set -e
cachedir="$HOME/.rncache"
mkdir -p "$cachedir"
function fetch_and_unpack () {
file=$1
url=$2
cmd=$3
if [ ! -f "$cachedir/$file" ]; then
(cd "$cachedir"; curl -J -L -O "$url")
fi
dir=$(basename "$file" .tar.gz)
if [ ! -d "third-party/$dir" ]; then
(cd third-party;
echo Unpacking "$cachedir/$file"...
tar zxf "$cachedir/$file"
cd "$dir"
eval "${cmd:-true}")
fi
}
mkdir -p third-party
SCRIPTDIR=$(pwd)/$(dirname "$0")
fetch_and_unpack glog-0.3.4.tar.gz https://github.com/google/glog/archive/v0.3.4.tar.gz "CC='$SCRIPTDIR'/ios-cc.sh CXX='$SCRIPTDIR'/ios-cc.sh ./configure --host arm-apple-darwin"
fetch_and_unpack double-conversion-1.1.1.tar.gz https://github.com/google/double-conversion/archive/v1.1.1.tar.gz
fetch_and_unpack boost_1_57_0.tar.gz https://github.com/react-native-community/boost-for-react-native/releases/download/v1.57.0-1/boost_1_57_0.tar.gz
fetch_and_unpack folly-2016.09.26.00.tar.gz https://github.com/facebook/folly/archive/v2016.09.26.00.tar.gz