blob: c59c8c7512f82cc63346b10ce41d107fa605909a [file] [log] [blame]
#!/usr/bin/env python
# Copyright 2017 Google Inc.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Create the asset."""
import argparse
import os
import shutil
import sys
def getenv(key):
val = os.environ.get(key)
if not val:
print(('Environment variable %s not set; you should run this via '
'' % key), file=sys.stderr)
return val
def create_asset(target_dir, android_sdk_root):
"""Create the asset."""
dst = os.path.join(target_dir, 'android-sdk')
shutil.copytree(android_sdk_root, dst)
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--target_dir', '-t', required=True)
args = parser.parse_args()
android_sdk_root = getenv(ENV_VAR)
create_asset(args.target_dir, android_sdk_root)
if __name__ == '__main__':