-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added exception handling for patch script so it works in esp8266 target
- Loading branch information
Showing
1 changed file
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|