create_sksl_enums.py 402 B

1234567891011121314151617181920
  1. #!/usr/bin/env python
  2. #
  3. # Copyright 2017 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. import os
  8. import subprocess
  9. import sys
  10. src = open(sys.argv[1], 'r')
  11. dst = open(sys.argv[2], 'wb')
  12. dst.write('R"(')
  13. for line in src.readlines():
  14. if not line.startswith("#"):
  15. dst.write(line)
  16. dst.write(')"\n')
  17. src.close()
  18. dst.close()