HBASE-24106 Update getting started documentation after HBASE-24086
[hbase.git] / hbase-native-client / bin / download-thirdparty.sh
blobdb98aae65db82577a59e9b51a2e9ec22084e3e48
1 #! /usr/bin/env bash
3 #/**
4 # * Copyright The Apache Software Foundation
5 # *
6 # * Licensed to the Apache Software Foundation (ASF) under one
7 # * or more contributor license agreements. See the NOTICE file
8 # * distributed with this work for additional information
9 # * regarding copyright ownership. The ASF licenses this file
10 # * to you under the Apache License, Version 2.0 (the
11 # * "License"); you may not use this file except in compliance
12 # * with the License. You may obtain a copy of the License at
13 # *
14 # * http://www.apache.org/licenses/LICENSE-2.0
15 # *
16 # * Unless required by applicable law or agreed to in writing, software
17 # * distributed under the License is distributed on an "AS IS" BASIS,
18 # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 # * See the License for the specific language governing permissions and
20 # * limitations under the License.
21 # */
23 set -x
24 set -e
26 SOURCE="${BASH_SOURCE[0]}"
27 while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
28 DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
29 SOURCE="$(readlink "$SOURCE")"
30 [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
31 done
32 DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
34 source ${DIR}/../bin/hbase-client-env.sh
36 mkdir -p ${HBASE_TP_DIR}
37 cd ${HBASE_TP_DIR}
40 if [ ! -d ${HBASE_GTEST_DIR} ]; then
41 echo "Fetching gtest"
42 wget -c http://googletest.googlecode.com/files/gtest-${HBASE_GTEST_VERSION}.zip
43 unzip gtest-${HBASE_GTEST_VERSION}.zip
44 rm gtest-${HBASE_GTEST_VERSION}.zip
47 if [ ! -d ${HBASE_PROTOBUF_DIR} ]; then
48 echo "Fetching protobuf"
49 wget -c http://protobuf.googlecode.com/files/protobuf-${HBASE_PROTOBUF_VERSION}.tar.gz
50 tar xzf protobuf-${HBASE_PROTOBUF_VERSION}.tar.gz
51 rm protobuf-${HBASE_PROTOBUF_VERSION}.tar.gz
54 if [ ! -d $HBASE_LIBEV_DIR ]; then
55 echo "Fetching libev"
56 wget -c http://dist.schmorp.de/libev/libev-${HBASE_LIBEV_VERSION}.tar.gz
57 tar zxf libev-${HBASE_LIBEV_VERSION}.tar.gz
58 rm -rf libev-${HBASE_LIBEV_VERSION}.tar.gz
61 if [ ! -d $HBASE_PREFIX/bin/cpplint.py ]; then
62 echo "Fetching cpplint"
63 mkdir -p $HBASE_PREFIX/bin/
64 wget -O $HBASE_PREFIX/bin/cpplint.py http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py
65 chmod +x $HBASE_PREFIX/bin/cpplint.py
69 echo "---------------"
70 echo "Thirdparty dependencies downloaded successfully"