aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/download_images.py
blob: 4342a9f1a6a55b74a59e68966cc9b3be1632701d (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
#!/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.


import common
import os
import sys


def main():
  if len(sys.argv) != 1:
    print >> sys.stderr, 'Usage: download_images.py'
    sys.exit(1)
  skia_dir = os.path.abspath(os.path.join(
      os.path.dirname(os.path.realpath(__file__)),
      os.pardir, os.pardir))
  dst_dir = os.path.join(skia_dir, os.pardir, 'images')
  tmp_dir = os.path.join(skia_dir, os.pardir, 'tmp')
  common.download_dir(skia_dir, tmp_dir, common.VERSION_FILE_SK_IMAGE,
                      common.GS_SUBDIR_TMPL_SK_IMAGE, dst_dir)


if __name__ == '__main__':
  main()