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

Side by Side Diff: sky/tools/android_library_cacher.py

Issue 878163005: Make skydb --gdb work a bit better on Android (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/tools/skydb » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import logging
8 import os
7 import re 9 import re
10 import skypy.paths
11 import subprocess
8 import sys 12 import sys
9 import os
10 import logging
11 import subprocess
12 13
13 SRC_ROOT = skypy.paths.Paths('ignored').src_root 14 SRC_ROOT = skypy.paths.Paths('ignored').src_root
14 ADB_PATH = os.path.join(SRC_ROOT, 15 ADB_PATH = os.path.join(SRC_ROOT,
15 'third_party/android_tools/sdk/platform-tools/adb') 16 'third_party/android_tools/sdk/platform-tools/adb')
16 17
17 18
18 # TODO(eseidel): This should be shared with adb_gdb 19 # TODO(eseidel): This should be shared with adb_gdb
19 def main(): 20 def main():
20 logging.basicConfig(level=logging.INFO) 21 logging.basicConfig(level=logging.INFO)
21 parser = argparse.ArgumentParser( 22 parser = argparse.ArgumentParser(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 dest_dir = os.path.dirname(dest_file) 57 dest_dir = os.path.dirname(dest_file)
57 if not os.path.exists(dest_dir): 58 if not os.path.exists(dest_dir):
58 os.makedirs(dest_dir) 59 os.makedirs(dest_dir)
59 print '%s -> %s' % (library_path, dest_file) 60 print '%s -> %s' % (library_path, dest_file)
60 pull_cmd = [ADB_PATH, 'pull', library_path, dest_file] 61 pull_cmd = [ADB_PATH, 'pull', library_path, dest_file]
61 subprocess.check_call(pull_cmd, stderr=dev_null) 62 subprocess.check_call(pull_cmd, stderr=dev_null)
62 63
63 64
64 if __name__ == '__main__': 65 if __name__ == '__main__':
65 main() 66 main()
OLDNEW
« 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