2017-02-01 22:10:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
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"...
|
2017-06-15 20:03:23 +00:00
|
|
|
if ! tar zxf "$cachedir/$file"; then
|
|
|
|
echo "Unpacking '$cachedir/$file' failed. Debug info:" 2>&1
|
|
|
|
ls -l "$cachedir/$file" 2>&1
|
|
|
|
shasum ~/.rncache/boost_1_63_0.tar.gz 2>&1
|
|
|
|
exit 1
|
|
|
|
fi
|
2017-02-01 22:10:43 +00:00
|
|
|
cd "$dir"
|
|
|
|
eval "${cmd:-true}")
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
mkdir -p third-party
|
|
|
|
|
2017-05-10 11:24:24 +00:00
|
|
|
SCRIPTDIR=$(dirname "$0")
|
2017-02-01 22:10:43 +00:00
|
|
|
|
2017-08-07 03:18:50 +00:00
|
|
|
fetch_and_unpack glog-0.3.4.tar.gz https://github.com/google/glog/archive/v0.3.4.tar.gz "\"$SCRIPTDIR/ios-configure-glog.sh\""
|
2017-03-07 19:59:12 +00:00
|
|
|
fetch_and_unpack double-conversion-1.1.5.tar.gz https://github.com/google/double-conversion/archive/v1.1.5.tar.gz
|
2017-03-10 13:16:56 +00:00
|
|
|
fetch_and_unpack boost_1_63_0.tar.gz https://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gz
|
2017-02-01 22:10:43 +00:00
|
|
|
fetch_and_unpack folly-2016.09.26.00.tar.gz https://github.com/facebook/folly/archive/v2016.09.26.00.tar.gz
|