Pythong script for initializing and updating peachcloud debian repo of
microservices.
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
from vars import VARS
|
||||
|
||||
import os
|
||||
import jinja2
|
||||
import subprocess
|
||||
@ -20,10 +18,8 @@ def render_template(src, dest, template_vars=None):
|
||||
:return: None
|
||||
"""
|
||||
template = template_env.get_template(src)
|
||||
if template_vars:
|
||||
template_vars.update(VARS)
|
||||
else:
|
||||
template_vars = VARS
|
||||
if not template_vars:
|
||||
template_vars= {}
|
||||
output_text = template.render(template_vars=template_vars)
|
||||
if os.path.exists(dest):
|
||||
os.remove(dest)
|
||||
@ -31,6 +27,3 @@ def render_template(src, dest, template_vars=None):
|
||||
f.write(output_text)
|
||||
|
||||
|
||||
def cargo_install(package):
|
||||
subprocess.call(['/root/.cargo/bin/cargo', 'install', package])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user