setup_resources 631 B

1234567891011121314151617181920
  1. #! /usr/bin/env python
  2. # Copyright 2018 Google Inc.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. import os
  6. import shutil
  7. import sys
  8. if __name__ == '__main__':
  9. skia = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)
  10. dst = os.path.join(skia, 'platform_tools', 'android', 'apps', 'skqp',
  11. 'src', 'main', 'assets', 'resources')
  12. if os.path.isdir(dst) and not os.path.islink(dst):
  13. shutil.rmtree(dst)
  14. elif os.path.exists(dst):
  15. os.remove(dst)
  16. shutil.copytree(os.path.join(skia, 'resources'), dst)