1
0

A few template updates (#93)

This commit is contained in:
Jesse Hills
2023-06-21 23:03:42 +12:00
committed by GitHub
Unverified
parent f38feccef3
commit b8ec2179ed
17 changed files with 143 additions and 52 deletions

View File

@@ -6,6 +6,7 @@ from pathlib import Path
from enum import Enum
from shutil import copyfile
import sys
import os
class Channel(Enum):
@@ -37,7 +38,8 @@ def main(args):
with open(path, "w") as f:
yaml.dump(conf, f, indent=2, sort_keys=False, explicit_start=True)
for file_, conf_ in copyf.items():
for file_ in copyf:
os.makedirs(dir_ / Path(file_).parent, exist_ok=True)
if Path.exists(templ / channel.value / file_):
copyfile(templ / channel.value / file_, dir_ / file_)
else: