Gating network behind compile flag
This commit is contained in:
+3
-4
@@ -1,6 +1,7 @@
|
||||
import argparse
|
||||
import csv
|
||||
import os
|
||||
|
||||
from tools.writeifchanged import write_if_changed
|
||||
|
||||
parser = argparse.ArgumentParser(description="Color CSV to .h defines")
|
||||
parser.add_argument("--csv", required=True, help="Path to color CSV file")
|
||||
@@ -79,6 +80,4 @@ for line in "\n".join(js).rstrip().splitlines():
|
||||
out[-1] = out[-1].rstrip(" \\")
|
||||
out.append("")
|
||||
|
||||
os.makedirs(os.path.dirname(args.output), exist_ok=True)
|
||||
with open(args.output, "w", encoding="utf-8") as f:
|
||||
f.write("\n".join(out))
|
||||
write_if_changed(args.output, "\n".join(out))
|
||||
|
||||
Reference in New Issue
Block a user