aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/assets/linux_vulkan_sdk/create.py
blob: 21c1ee7f372df1778730631a665cccc065fa68e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python
#
# Copyright 2016 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 shutil
import sys
import os



def create_asset(target_dir, sdk_path):
  """Create the asset."""
  shutil.copytree(sdk_path, target_dir)


def main():
  if 'linux' not in sys.platform:
    print >> sys.stderr, 'This script only runs on Linux.'
    sys.exit(1)
  parser = argparse.ArgumentParser()
  parser.add_argument('--target_dir', '-t', required=True)
  parser.add_argument('--sdk_path', '-s', required=True)
  args = parser.parse_args()
  create_asset(args.target_dir, args.sdk_path)


if __name__ == '__main__':
  main()