tdesktop/Telegram/build/docker/centos_env/gen_dockerfile.py

17 lines
474 B
Python
Raw Normal View History

#!/usr/bin/env python3
from os import environ
from os.path import dirname
from jinja2 import Environment, FileSystemLoader
2023-03-17 20:40:18 +00:00
def checkEnv(envName, defaultValue):
return bool(len(environ[envName])) if envName in environ else defaultValue
def main():
print(Environment(loader=FileSystemLoader(dirname(__file__))).get_template("Dockerfile").render(
2023-03-17 20:40:18 +00:00
DEBUG=checkEnv("DEBUG", True),
LTO=checkEnv("LTO", True),
))
if __name__ == '__main__':
main()