Tasmota/pio-tools/override_copy.py

22 lines
915 B
Python
Raw Normal View History

2020-05-06 15:23:29 +01:00
Import('env')
import os
import shutil
# copy tasmota/user_config_override_sample.h to tasmota/user_config_override.h
if os.path.isfile("tasmota/user_config_override.h"):
print ("*** use provided user_config_override.h as planned ***")
else:
shutil.copy("tasmota/user_config_override_sample.h", "tasmota/user_config_override.h")
2021-04-12 09:18:27 +01:00
# copy platformio_override_sample.ini to platformio_override.ini
if os.path.isfile("platformio_override.ini"):
print ("*** use provided platformio_override.ini as planned ***")
else:
shutil.copy("platformio_override_sample.ini", "platformio_override.ini")
# copy platformio_tasmota_cenv_sample.ini to platformio_tasmota_cenv.ini
if os.path.isfile("platformio_tasmota_cenv.ini"):
print ("*** use provided platformio_tasmota_cenv.ini as planned ***")
else:
2021-04-24 19:11:27 +01:00
shutil.copy("platformio_tasmota_cenv_sample.ini", "platformio_tasmota_cenv.ini")