| OLD | NEW |
| 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 Loading... |
| 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() |
| OLD | NEW |