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

Side by Side Diff: build/android/gyp/push_libraries.py

Issue 14795012: [Android] Pass -p to mkdir commands (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/gyp/create_device_library_links.py ('k') | no next file » | 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 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Pushes native libraries to a device. 7 """Pushes native libraries to a device.
8 8
9 """ 9 """
10 10
(...skipping 17 matching lines...) Expand all
28 adb = android_commands.AndroidCommands() 28 adb = android_commands.AndroidCommands()
29 serial_number = adb.Adb().GetSerialNumber() 29 serial_number = adb.Adb().GetSerialNumber()
30 # A list so that it is modifiable in Push below. 30 # A list so that it is modifiable in Push below.
31 needs_directory = [True] 31 needs_directory = [True]
32 for lib in libraries: 32 for lib in libraries:
33 device_path = os.path.join(options.device_dir, lib) 33 device_path = os.path.join(options.device_dir, lib)
34 host_path = os.path.join(options.libraries_dir, lib) 34 host_path = os.path.join(options.libraries_dir, lib)
35 35
36 def Push(): 36 def Push():
37 if needs_directory: 37 if needs_directory:
38 adb.RunShellCommand('mkdir ' + options.device_dir) 38 adb.RunShellCommand('mkdir -p ' + options.device_dir)
39 needs_directory[:] = [] # = False 39 needs_directory[:] = [] # = False
40 adb.PushIfNeeded(host_path, device_path) 40 adb.PushIfNeeded(host_path, device_path)
41 41
42 record_path = '%s.%s.push.md5.stamp' % (host_path, serial_number) 42 record_path = '%s.%s.push.md5.stamp' % (host_path, serial_number)
43 md5_check.CallAndRecordIfStale( 43 md5_check.CallAndRecordIfStale(
44 Push, 44 Push,
45 record_path=record_path, 45 record_path=record_path,
46 input_paths=[host_path], 46 input_paths=[host_path],
47 input_strings=[device_path]) 47 input_strings=[device_path])
48 48
(...skipping 18 matching lines...) Expand all
67 build_utils.CheckOptions(options, parser, required=required_options) 67 build_utils.CheckOptions(options, parser, required=required_options)
68 68
69 DoPush(options) 69 DoPush(options)
70 70
71 if options.stamp: 71 if options.stamp:
72 build_utils.Touch(options.stamp) 72 build_utils.Touch(options.stamp)
73 73
74 74
75 if __name__ == '__main__': 75 if __name__ == '__main__':
76 sys.exit(main(sys.argv)) 76 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/gyp/create_device_library_links.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698