# ---------------------------------------------------------------------------- # "THE TSCHUNK LICENSE" (Revision 42): # wrote this file. As long as you retain this notice # you can do whatever you want with this stuff. If we meet some day, and you # think this stuff is worth it, you can buy me a Tschunk in return. # ---------------------------------------------------------------------------- import configparser import sys Import('env') config = configparser.ConfigParser() config.read("platformio.ini") sign_cert = config.get('uploadconfig', 'sign_cert') cert = '' try: with open(sign_cert, 'r') as f: for line in f: cert += line.replace("\n", " ") env.Append(BUILD_FLAGS='\'-DPUBLIC_SIGN_KEY="' + cert + '"\'') except FileNotFoundError: sys.stderr.write("No public key for signing found! Continuing without update support!\n") pass