summaryrefslogtreecommitdiff
path: root/scripts/d8-common.sh
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-05-05 17:20:03 -0700
committerBen Smith <binji@chromium.org>2016-05-05 17:37:31 -0700
commitf9f344cc486795a058f474a6e7eca669cf01864c (patch)
tree04d7eb040c277001df9813bf6f6771e313c83c90 /scripts/d8-common.sh
parent8447d7bda7cd80f0a5d44bfb8a6824dff3af9e47 (diff)
downloadwabt-f9f344cc486795a058f474a6e7eca669cf01864c.tar.gz
wabt-f9f344cc486795a058f474a6e7eca669cf01864c.tar.bz2
wabt-f9f344cc486795a058f474a6e7eca669cf01864c.zip
{download,upload}-d8.sh scripts support MacOSX
Also, remove uses of readlink -f because they don't work on OSX.
Diffstat (limited to 'scripts/d8-common.sh')
-rw-r--r--scripts/d8-common.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/d8-common.sh b/scripts/d8-common.sh
new file mode 100644
index 00000000..8b10c50c
--- /dev/null
+++ b/scripts/d8-common.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# Copyright 2016 WebAssembly Community Group participants
+#
+# 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.
+#
+
+OS=$(uname -s)
+SCRIPT_DIR="$(cd "$(dirname "$0")"; pwd -P)"
+ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
+V8_DIR="${ROOT_DIR}/third_party/v8/v8"
+V8_OUT_DIR="${V8_DIR}/out/Release"
+V8_SHA=$(cd "${V8_DIR}" && git rev-parse HEAD)
+# TODO(binji): other architectures
+V8_HOST_ARCH=x86_64
+V8_TARGET_ARCH=x86_64
+V8_BASE_BUCKET_HTTPS_URL=https://storage.googleapis.com/webassembly/v8
+V8_BASE_BUCKET_GS_URL=gs://webassembly/v8
+V8_BUCKET_PATH=${V8_SHA}/${OS}/${V8_HOST_ARCH}-${V8_TARGET_ARCH}
+V8_BUCKET_GS_URL=${V8_BASE_BUCKET_GS_URL}/${V8_BUCKET_PATH}
+V8_BUCKET_HTTPS_URL=${V8_BASE_BUCKET_HTTPS_URL}/${V8_BUCKET_PATH}
+D8_FILES="d8 natives_blob.bin snapshot_blob.bin"