aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-07-22 03:34:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-22 03:34:25 -0700
commit6af0c958a0d024f65a9049f5b84793e03b781801 (patch)
tree288e257c8cc504bc50e17359ce6c36992c4ac45b /bin
parentcdeff81bdb2e5cde422b6850634c5d3977fcbae9 (diff)
GN: restore gn.py partly as fetch-gn
Same as before, except it explicitly only fetches GN instead of acting like a proxy for it. I found myself always typing 'gn' anyway. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167353002 Review-Url: https://codereview.chromium.org/2167353002
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fetch-gn24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/fetch-gn b/bin/fetch-gn
new file mode 100755
index 0000000000..f2d3c42960
--- /dev/null
+++ b/bin/fetch-gn
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import subprocess
+import sys
+
+def quiet(*cmd):
+ cmd = ' '.join(cmd).split()
+ subprocess.check_output(cmd)
+
+def gn_path():
+ if 'linux' in sys.platform:
+ return 'buildtools/linux64/gn'
+ if 'darwin' in sys.platform:
+ return 'buildtools/mac/gn'
+ return 'buildtools/win/gn.exe'
+
+quiet('download_from_google_storage',
+ '--no_resume --no_auth --bucket chromium-gn',
+ '-s ', gn_path() + '.sha1')