代码拉取完成,页面将自动刷新
#!/bin/bash
if [ $# -lt 1 ]; then
return 1
fi
MIRROR=$1
## Set XX_VERSION=DISABLE to void building specified dependency
BOOST_VERSION=1_58_0
PROTOBUF_VERSION=2.6.1
SNAPPY_VERSION=1.1.3
SOFA_PBRPC_VERSION=1.1.4
ZOOKEEPER_VERSION=3.4.10
GFLAGS_VERSION=2.1.2
GLOG_VERSION=0.3.3
GTEST_VERSION=1.8.0
LIBUNWIND_VERSION=0.99
GPERFTOOLS_VERSION=2.5
INS_VERSION=0.17
NOSE_VERSION=1.3.7
MONGOOSE_VERSION=6.11
if [ $MIRROR == "china" ]; then
BOOST_URL=http://mirrors.tuna.tsinghua.edu.cn/macports/distfiles/boost/boost_${BOOST_VERSION}.tar.bz2
PROTOBUF_URL=https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.tar.gz
SNAPPY_URL=http://mirrors.163.com/gentoo/distfiles/snappy-${SNAPPY_VERSION}.tar.gz
SOFA_PBRPC_URL=https://github.com/baidu/sofa-pbrpc/archive/v${SOFA_PBRPC_VERSION}.tar.gz
ZOOKEEPER_URL=http://mirrors.163.com/gentoo/distfiles/zookeeper-${ZOOKEEPER_VERSION}.tar.gz
GFLAGS_URL=https://github.com/schuhschuh/gflags/archive/v${GFLAGS_VERSION}.tar.gz
GLOG_URL=https://github.com/google/glog/archive/v${GLOG_VERSION}.tar.gz
GTEST_URL=https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz
LIBUNWIND_URL=http://repository.timesys.com/buildsources/l/libunwind/libunwind-${LIBUNWIND_VERSION}/libunwind-${LIBUNWIND_VERSION}.tar.gz
GPERFTOOLS_URL=https://github.com/00k/gperftools/raw/master/gperftools-${GPERFTOOLS_VERSION}.tar.gz
INS_URL=https://github.com/baidu/ins/archive/${INS_VERSION}.tar.gz
NOSE_URL=http://mirrors.163.com/gentoo/distfiles/nose-${NOSE_VERSION}.tar.gz
MONGOOSE_URL=https://github.com/cesanta/mongoose/archive/${MONGOOSE_VERSION}.tar.gz
elif [ $MIRROR == "origin" ]; then
# BOOST_URL=http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_${BOOST_VERSION}.tar.bz2
BOOST_URL=https://jaist.dl.sourceforge.net/project/boost/boost/1.58.0/boost_${BOOST_VERSION}.tar.bz2
PROTOBUF_URL=https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.tar.gz
SNAPPY_URL=https://github.com/google/snappy/releases/download/${SNAPPY_VERSION}/snappy-${SNAPPY_VERSION}.tar.gz
SOFA_PBRPC_URL=https://github.com/baidu/sofa-pbrpc/archive/v${SOFA_PBRPC_VERSION}.tar.gz
ZOOKEEPER_URL=http://www-us.apache.org/dist/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/zookeeper-${ZOOKEEPER_VERSION}.tar.gz
GFLAGS_URL=https://github.com/schuhschuh/gflags/archive/v${GFLAGS_VERSION}.tar.gz
GLOG_URL=https://github.com/google/glog/archive/v${GLOG_VERSION}.tar.gz
GTEST_URL=https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz
LIBUNWIND_URL=http://repository.timesys.com/buildsources/l/libunwind/libunwind-${LIBUNWIND_VERSION}/libunwind-${LIBUNWIND_VERSION}.tar.gz
GPERFTOOLS_URL=https://github.com/gperftools/gperftools/releases/download/gperftools-${GPERFTOOLS_VERSION}/gperftools-${GPERFTOOLS_VERSION}.tar.gz
INS_URL=https://github.com/baidu/ins/archive/${INS_VERSION}.tar.gz
NOSE_URL=http://mirrors.163.com/gentoo/distfiles/nose-${NOSE_VERSION}.tar.gz
MONGOOSE_URL=https://github.com/cesanta/mongoose/archive/${MONGOOSE_VERSION}.tar.gz
else
return 1
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。