Skip to content

Commit

Permalink
Added exception handling for patch script so it works in esp8266 target
Browse files Browse the repository at this point in the history
  • Loading branch information
mp-se committed Jan 18, 2025
1 parent ecda975 commit 554589f
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions script/patch_platformio.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
Import("env")
import shutil

framework_dir = env.PioPlatform().get_package_dir("framework-arduinoespressif32")
dir = env.GetLaunchDir()
try:
framework_dir = env.PioPlatform().get_package_dir("framework-arduinoespressif32")
dir = env.GetLaunchDir()

platform_dir = env.PioPlatform().get_dir()
platform_dir = env.PioPlatform().get_dir()

source = dir+ "/patch/platforms/espressif32/"
target = platform_dir + "/"
print( "Copy directory : " + source + " -> " + target )
shutil.copytree(source, target, dirs_exist_ok=True)
source = dir+ "/patch/platforms/espressif32/"
target = platform_dir + "/"
print( "Copy directory : " + source + " -> " + target )
shutil.copytree(source, target, dirs_exist_ok=True)

source = dir + "/patch/packages/framework-arduinoespressif32/"
target = framework_dir + "/"
print( "Copy directory : " + source + " -> " + target )
shutil.copytree(source, target, dirs_exist_ok=True)
source = dir + "/patch/packages/framework-arduinoespressif32/"
target = framework_dir + "/"
print( "Copy directory : " + source + " -> " + target )
shutil.copytree(source, target, dirs_exist_ok=True)
except:
pass

0 comments on commit 554589f

Please sign in to comment.