xref: /aosp_15_r20/external/skia/third_party/libgrapheme/generate_headers.py (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1#!/usr/bin/env python
2
3# Copyright 2023 Google LLC.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7'''
8Generate c header out of txt file
9
10Output is a header
11'''
12
13import subprocess
14import sys
15
16header = open(sys.argv[2], "w")
17code = subprocess.Popen(sys.argv[1], shell=True, universal_newlines=True, stdout=header, cwd=sys.argv[3])
18exit(code.wait())
19