resolve bugs on the stable version

This commit is contained in:
bunkerity
2021-07-22 12:12:55 +02:00
parent 15bdb076c8
commit 36b8760d4d
9 changed files with 142 additions and 124 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/python3
import argparse, os, sys, shutil
import argparse, os, sys, shutil, glob
import utils
from Configurator import Configurator
@@ -51,14 +51,10 @@ if __name__ == "__main__" :
config = configurator.get_config()
#print(config)
# Remove old config
# TODO : remove unnecessary files after rendering
# for filename in os.listdir(args.output):
# file_path = os.path.join(args.output, filename)
# if os.path.isfile(file_path) or os.path.islink(file_path):
# os.unlink(file_path)
# elif os.path.isdir(file_path):
# shutil.rmtree(file_path)
# TODO : find a proper way to remove old sites
env_list = glob.glob(args.output + "/**/*.env", recursive=True)
for env in env_list :
os.remove(env)
# Generate the files from templates and config
templator = Templator(config, args.templates, args.output, args.target)