Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: sdk_build/data/common/download_mojom_parser.sh

Issue 1720433003: SDK stuff: Add a script to download the mojom parser binary. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk_build/data/common/download_file_from_google_storage.py ('k') | sdk_build/data/cpp/cpp.sdk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk_build/data/common/download_mojom_parser.sh
diff --git a/sdk_build/data/common/download_mojom_parser.sh b/sdk_build/data/common/download_mojom_parser.sh
new file mode 100755
index 0000000000000000000000000000000000000000..5051e77176ac7e1792f40d2ca861b1a80b122749
--- /dev/null
+++ b/sdk_build/data/common/download_mojom_parser.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Note: In the SDK, this script lives in third_party/mojo_sdk_setup.
+SCRIPT_DIR=$(dirname $0)
+DOWNLOADER=${SCRIPT_DIR}/download_file_from_google_storage.py
+
+UNAME=$(uname)
+case "$UNAME" in
+ Linux)
+ # TODO(vtl): We currently just always assume 64-bit.
+ HOST_ARCH=linux64
+ ;;
+ Darwin)
+ HOST_ARCH=mac64
+ ;;
+ *)
+ echo "$0: unknown system: ${UNAME}" 1>&2
+ ;;
+esac
+
+FILE=${SCRIPT_DIR}/../mojo/public/tools/bindings/mojom_parser/bin/${HOST_ARCH}/mojom_parser
+HASH=$(cat "${FILE}.sha1")
+# This includes the bucket name first.
+GS_NAME=mojo/mojom_parser/${HOST_ARCH}/${HASH}
+
+"$DOWNLOADER" --sha1-hash="${HASH}" --executable "$GS_NAME" "$FILE"
« no previous file with comments | « sdk_build/data/common/download_file_from_google_storage.py ('k') | sdk_build/data/cpp/cpp.sdk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698