minor clean up in scripts (#17483)

This commit is contained in:
Jason2866 2022-12-22 17:50:40 +01:00 committed by GitHub
parent 3c1531bf1c
commit c574e24cad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 11 deletions

View File

@ -1,6 +1,5 @@
Import("env")
env = DefaultEnvironment()
platform = env.PioPlatform()
import os
import glob
import subprocess

View File

@ -1,7 +1,7 @@
Import("env")
import os
import shutil
import pathlib
import tasmotapiolib
import gzip

View File

@ -1,6 +1,7 @@
# Original idea by Pascal Gollor at 2022-12-13
Import("env")
import os
import tasmotapiolib

View File

@ -1,9 +1,7 @@
Import("env")
Import("projenv")
import os
import shutil
import pathlib
import tasmotapiolib

View File

@ -1,21 +1,22 @@
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:
else:
shutil.copy("tasmota/user_config_override_sample.h", "tasmota/user_config_override.h")
# 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:
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:
else:
shutil.copy("platformio_tasmota_cenv_sample.ini", "platformio_tasmota_cenv.ini")

View File

@ -1,8 +1,8 @@
Import("env")
import glob
import os
Import("env")
def FindInoNodes(env):
src_dir = glob.escape(env.subst("$PROJECT_SRC_DIR"))
return env.Glob(os.path.join(src_dir, "*.ino")) + env.Glob(