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

Unified Diff: sky/tools/mojo_cache_linker.py

Issue 1155583006: Make skydb --gdb work on mac. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/skydb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/mojo_cache_linker.py
diff --git a/sky/tools/mojo_cache_linker.py b/sky/tools/mojo_cache_linker.py
index d848ecdf84b97431c676cfede406766dd6b7bc3c..783377479eaf2665bf1f77e6d008ddef875b66cd 100755
--- a/sky/tools/mojo_cache_linker.py
+++ b/sky/tools/mojo_cache_linker.py
@@ -9,6 +9,7 @@ import os
import sys
import subprocess
import json
+import platform
def library_paths(build_dir):
@@ -44,10 +45,14 @@ def compute_path_to_app_id_map(paths, cache, cache_mtime):
for path in paths:
app_id = get_cached_app_id(path, cache, cache_mtime)
if not app_id:
- logging.info('sha256sum %s' % path)
+ if platform.system() == 'Darwin':
+ logging.info('shasum -a 256 %s' % path)
+ output = subprocess.check_output(['shasum', '-a', '256', path])
+ else:
+ logging.info('sha256sum %s' % path)
+ output = subprocess.check_output(['sha256sum', path])
# Example output:
# f82a3551478a9a0e010adccd675053b9 png_viewer.mojo
- output = subprocess.check_output(['sha256sum', path])
app_id = output.strip().split()[0]
path_to_app_id_map[path] = app_id
return path_to_app_id_map
« no previous file with comments | « no previous file | sky/tools/skydb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698