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

Unified Diff: sky/tools/download_sky_server

Issue 1132793004: Add sky_server for mac host (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: updated upload_sky_server Created 5 years, 7 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 | « no previous file | sky/tools/skygo/README » ('j') | sky/tools/upload_sky_server » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/download_sky_server
diff --git a/sky/tools/download_sky_server b/sky/tools/download_sky_server
index c3a95a1de7eeb5782ed88115a77df33935e827a6..a3afea0a7c1e996706bdaa0f29318fa58a6fdd4f 100755
--- a/sky/tools/download_sky_server
+++ b/sky/tools/download_sky_server
@@ -6,10 +6,20 @@
import os
import stat
import subprocess
+import sys
from webkitpy.common.system import filesystem
from webkitpy.common.webkit_finder import WebKitFinder
+PLATFORM_MAPPING = {
+ 'cygwin': 'win',
+ 'darwin': 'mac',
+ 'linux2': 'linux',
jamesr 2015/05/21 21:33:05 i wouldn't add win entries and instead of checking
+ 'win32': 'win',
+}
+
+sha1 = 'sky_server_' + PLATFORM_MAPPING[sys.platform] + '.sha1'
+
finder = WebKitFinder(filesystem.FileSystem())
output_file_ = finder.path_from_chromium_base('out', 'downloads', 'sky_server')
@@ -18,7 +28,7 @@ subprocess.call([
'--no_resume',
'--no_auth',
'--bucket', 'mojo',
- '--sha1_file', finder.path_from_chromium_base('sky', 'tools', 'skygo', 'sky_server.sha1'),
+ '--sha1_file', finder.path_from_chromium_base('sky', 'tools', 'skygo', sha1),
'--output', output_file_
])
os.chmod(output_file_, os.stat(output_file_).st_mode | stat.S_IEXEC)
« no previous file with comments | « no previous file | sky/tools/skygo/README » ('j') | sky/tools/upload_sky_server » ('J')

Powered by Google App Engine
This is Rietveld 408576698