OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 # Note: In the SDK, this script lives in third_party/mojo_sdk_setup. |
| 7 SCRIPT_DIR=$(dirname $0) |
| 8 DOWNLOADER=${SCRIPT_DIR}/download_file_from_google_storage.py |
| 9 |
| 10 UNAME=$(uname) |
| 11 case "$UNAME" in |
| 12 Linux) |
| 13 # TODO(vtl): We currently just always assume 64-bit. |
| 14 HOST_ARCH=linux64 |
| 15 ;; |
| 16 Darwin) |
| 17 HOST_ARCH=mac64 |
| 18 ;; |
| 19 *) |
| 20 echo "$0: unknown system: ${UNAME}" 1>&2 |
| 21 ;; |
| 22 esac |
| 23 |
| 24 FILE=${SCRIPT_DIR}/../mojo/public/tools/bindings/mojom_parser/bin/${HOST_ARCH}/m
ojom_parser |
| 25 HASH=$(cat "${FILE}.sha1") |
| 26 # This includes the bucket name first. |
| 27 GS_NAME=mojo/mojom_parser/${HOST_ARCH}/${HASH} |
| 28 |
| 29 "$DOWNLOADER" --sha1-hash="${HASH}" --executable "$GS_NAME" "$FILE" |
OLD | NEW |