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

Side by Side Diff: infra/bots/assets/android_sdk/create.py

Issue 2086003002: Add Android SDK asset (Closed) Base URL: https://skia.googlesource.com/skia.git@cipd
Patch Set: Created 4 years, 6 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
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2016 Google Inc.
4 #
5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file.
7
8
9 """Create the asset."""
10
11
12 import argparse
13 import os
14 import shutil
15
16
17 def create_asset(target_dir, android_sdk_root):
18 """Create the asset."""
19 if not android_sdk_root:
20 android_sdk_root = (os.environ.get('ANDROID_HOME') or
21 os.environ.get('ANDROID_SDK_ROOT'))
22 if not android_sdk_root:
23 raise Exception('No --android_sdk_root provided and no ANDROID_HOME or '
24 'ANDROID_SDK_ROOT environment variables.')
25
26 dst = os.path.join(target_dir, 'android-sdk')
27 shutil.copytree(android_sdk_root, dst)
28
29
30 def main():
31 parser = argparse.ArgumentParser()
32 parser.add_argument('--android_sdk_root')
33 parser.add_argument('--target_dir', '-t', required=True)
34 args = parser.parse_args()
35 create_asset(args.target_dir, args.android_sdk_root)
36
37
38 if __name__ == '__main__':
39 main()
OLDNEW
« no previous file with comments | « infra/bots/assets/android_sdk/common.py ('k') | infra/bots/assets/android_sdk/create_and_upload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698