The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.7 KiB
58 lines
1.7 KiB
6 years ago
|
#!/bin/bash
|
||
6 years ago
|
# Copyright 2019 The gRPC Authors
|
||
|
#
|
||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
# you may not use this file except in compliance with the License.
|
||
|
# You may obtain a copy of the License at
|
||
|
#
|
||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||
|
#
|
||
|
# Unless required by applicable law or agreed to in writing, software
|
||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
# See the License for the specific language governing permissions and
|
||
|
# limitations under the License.
|
||
|
|
||
6 years ago
|
|
||
|
# Keeping up with Bazel's breaking changes is currently difficult.
|
||
|
# This script wraps calling bazel by downloading the currently
|
||
|
# supported version, and then calling it. This way, we can make sure
|
||
|
# that running bazel will always get meaningful results, at least
|
||
|
# until Bazel 1.0 is released.
|
||
6 years ago
|
# NOTE: This script relies on bazel's feature where //tools/bazel
|
||
|
# script can be used to hijack "bazel" invocations in given workspace.
|
||
6 years ago
|
|
||
|
set -e
|
||
|
|
||
|
VERSION=0.24.1
|
||
|
|
||
6 years ago
|
echo "INFO: Running bazel wrapper (see //tools/bazel for details), bazel version $VERSION will be used instead of system-wide bazel installation."
|
||
|
|
||
|
CWD=$(pwd)
|
||
6 years ago
|
BASEURL=https://github.com/bazelbuild/bazel/releases/download/
|
||
6 years ago
|
cd "$(dirname "$0")"
|
||
|
TOOLDIR=$(pwd)
|
||
6 years ago
|
|
||
6 years ago
|
case $(uname -sm) in
|
||
6 years ago
|
"Linux x86_64")
|
||
|
suffix=linux-x86_64
|
||
|
;;
|
||
|
"Darwin x86_64")
|
||
|
suffix=darwin-x86_64
|
||
|
;;
|
||
|
*)
|
||
6 years ago
|
echo "Unsupported architecture: $(uname -sm)"
|
||
6 years ago
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
6 years ago
|
filename="bazel-$VERSION-$suffix"
|
||
6 years ago
|
|
||
6 years ago
|
if [ ! -x "$filename" ] ; then
|
||
|
curl -L "$BASEURL/$VERSION/$filename" > "$filename"
|
||
|
chmod a+x "$filename"
|
||
6 years ago
|
fi
|
||
|
|
||
6 years ago
|
cd "$CWD"
|
||
|
"$TOOLDIR/$filename" $@
|