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

Side by Side Diff: build/android/gyp/create_device_library_links.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 | « no previous file | build/android/gyp/push_libraries.py » ('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 # 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 """Creates symlinks to native libraries for an APK. 7 """Creates symlinks to native libraries for an APK.
8 8
9 The native libraries should have previously been pushed to the device (in 9 The native libraries should have previously been pushed to the device (in
10 options.target_dir). This script then creates links in an apk's lib/ folder to 10 options.target_dir). This script then creates links in an apk's lib/ folder to
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 with open(options.script_host_path, 'w') as scriptfile: 51 with open(options.script_host_path, 'w') as scriptfile:
52 scriptfile.write(script) 52 scriptfile.write(script)
53 53
54 54
55 def TriggerSymlinkScript(options): 55 def TriggerSymlinkScript(options):
56 apk_package = apk_helper.GetPackageName(options.apk) 56 apk_package = apk_helper.GetPackageName(options.apk)
57 apk_libraries_dir = '/data/data/%s/lib' % apk_package 57 apk_libraries_dir = '/data/data/%s/lib' % apk_package
58 58
59 adb = android_commands.AndroidCommands() 59 adb = android_commands.AndroidCommands()
60 device_dir = os.path.dirname(options.script_device_path) 60 device_dir = os.path.dirname(options.script_device_path)
61 mkdir_cmd = ('if [ ! -e %(dir)s ]; then mkdir %(dir)s; fi ' % 61 mkdir_cmd = ('if [ ! -e %(dir)s ]; then mkdir -p %(dir)s; fi ' %
62 { 'dir': device_dir }) 62 { 'dir': device_dir })
63 RunShellCommand(adb, mkdir_cmd) 63 RunShellCommand(adb, mkdir_cmd)
64 adb.PushIfNeeded(options.script_host_path, options.script_device_path) 64 adb.PushIfNeeded(options.script_host_path, options.script_device_path)
65 65
66 trigger_cmd = ( 66 trigger_cmd = (
67 'APK_LIBRARIES_DIR=%(apk_libraries_dir)s; ' 67 'APK_LIBRARIES_DIR=%(apk_libraries_dir)s; '
68 'STRIPPED_LIBRARIES_DIR=%(target_dir)s; ' 68 'STRIPPED_LIBRARIES_DIR=%(target_dir)s; '
69 '. %(script_device_path)s' 69 '. %(script_device_path)s'
70 ) % { 70 ) % {
71 'apk_libraries_dir': apk_libraries_dir, 71 'apk_libraries_dir': apk_libraries_dir,
(...skipping 28 matching lines...) Expand all
100 100
101 CreateSymlinkScript(options) 101 CreateSymlinkScript(options)
102 TriggerSymlinkScript(options) 102 TriggerSymlinkScript(options)
103 103
104 if options.stamp: 104 if options.stamp:
105 build_utils.Touch(options.stamp) 105 build_utils.Touch(options.stamp)
106 106
107 107
108 if __name__ == '__main__': 108 if __name__ == '__main__':
109 sys.exit(main(sys.argv)) 109 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/android/gyp/push_libraries.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698