-
Notifications
You must be signed in to change notification settings - Fork 923
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Meson: Generate the sqlite3 bind-dnssec schema code
- Loading branch information
1 parent
20bada0
commit fe4e8aa
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Produce BIND DNSSEC schema usable from C.""" | ||
|
||
import sys | ||
|
||
sql_filename = sys.argv[1] | ||
|
||
with open(sql_filename, mode="r", encoding="utf-8") as f_in: | ||
contents = f_in.read() | ||
|
||
print("#pragma once") | ||
print() | ||
print("static char sqlCreate[] __attribute__((unused)) =") | ||
for line in contents.split("\n"): | ||
print(f'"{line}"') | ||
print(";") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters