Commit 1d2a7dcf authored by Leo Iannacone's avatar Leo Iannacone

update to use coffee instead of js

parent 600e512f
......@@ -6,21 +6,20 @@ import os
base_path = os.environ['SCRIPTS_DIR']
global_config_file = os.path.join(base_path, '../lib/config.js')
user_config_file = os.path.join(base_path, '../user.config.js')
global_config_file = os.path.join(base_path, '../lib/config.coffee')
user_config_file = os.path.join(base_path, '../user.config.coffee')
if os.path.isfile(user_config_file):
print ("A config user file already exists. Skipping creation.")
exit()
export_header = """
/*
* debomatic-webui user configuration
*/
###
debomatic-webui user configuration
###
"""
export_config = []
export_config = [export_header]
with open(global_config_file) as fd:
start = False
......@@ -33,11 +32,10 @@ with open(global_config_file) as fd:
if start:
export_config.append(line)
export_config.append('// DO NOT EDIT THIS LINE:\n')
export_config.append('# DO NOT EDIT THIS LINE:\n')
export_config.append('module.exports = config\n')
print ("Creating user configuration ...")
with open(user_config_file, 'w') as fd:
fd.write(export_header)
fd.write(''.join(export_config))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment