chore: remove unused scripts folder

This commit is contained in:
Loïc Grégoire
2026-03-28 15:09:24 -04:00
parent e654a58897
commit d1b011a27e
-37
View File
@@ -1,37 +0,0 @@
#!/usr/bin/env python3
# Generate C header file from .config
# Usage: genconfig.py <output file>
import sys
import argparse
parser = argparse.ArgumentParser(description="Generate C header file from KConfig")
parser.add_argument("output", help="Output C file")
args = parser.parse_args()
values = {}
def value_from_str(string):
if string == 'y':
return 1
if string == 'n':
return 0
return string
with open('.config', 'r') as f:
lines = f.read().splitlines()
for line in lines:
if line.startswith('#') or len(line) == 0:
continue
vals = line.split('=')
values[vals[0]] = value_from_str(vals[1])
with open(args.output, 'w') as f:
f.write('/* This file is auto-generated by scripts/genconfig.py */\n')
f.write('#ifndef GENCONFIG_CONFIG_H_\n')
f.write('#define GENCONFIG_CONFIG_H_\n')
for key, val in values.items():
f.write(f'#define {key} {val}\n')
f.write('#endif\n')