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 shutil 14 import sys 15 import os 16 17 def create_asset(target_dir, lib_path): 18 """Create the asset.""" 19 shutil.copytree(lib_path, target_dir) 20 21 22 def main(): 23 if 'linux' not in sys.platform: 24 print >> sys.stderr, 'This script only runs on Linux.' 25 sys.exit(1) 26 parser = argparse.ArgumentParser() 27 parser.add_argument('--target_dir', '-t', required=True) 28 parser.add_argument('--lib_path', '-l', required=True) 29 args = parser.parse_args() 30 create_asset(args.target_dir, args.lib_path) 31 32 33 if __name__ == '__main__': 34 main() 35