From f9f20bb45448a03e2d4d01e1c5d4ac76ec75d8c6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 8 Aug 2019 05:38:24 -0500 Subject: [PATCH] Allow py scripts to handle spaces in paths (#14876) --- buildroot/share/PlatformIO/scripts/alfawise_Ux0.py | 2 +- buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py | 4 ++-- .../PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py | 2 +- buildroot/share/PlatformIO/scripts/mks_robin.py | 2 +- buildroot/share/PlatformIO/scripts/mks_robin_lite.py | 2 +- buildroot/share/PlatformIO/scripts/mks_robin_mini.py | 2 +- buildroot/share/PlatformIO/scripts/mks_robin_nano.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/alfawise_Ux0.py b/buildroot/share/PlatformIO/scripts/alfawise_Ux0.py index be6bc59c44..055f95cc70 100644 --- a/buildroot/share/PlatformIO/scripts/alfawise_Ux0.py +++ b/buildroot/share/PlatformIO/scripts/alfawise_Ux0.py @@ -23,4 +23,4 @@ def encrypt(source, target, env): finally: firmware.close() marlin_alfa.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt); diff --git a/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py b/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py index 995f3d3bb0..3f45185ac8 100644 --- a/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py +++ b/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py @@ -15,8 +15,8 @@ env.AddPostAction( "$OBJCOPY", "-O", "ihex", - "$BUILD_DIR/${PROGNAME}.elf", - "$BUILD_DIR/${PROGNAME}.hex" + '"$BUILD_DIR/${PROGNAME}.elf"', + '"$BUILD_DIR/${PROGNAME}.hex"' ]), "Building $TARGET")) # please keep $SOURCE variable, it will be replaced with a path to firmware diff --git a/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py b/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py index 89e7b3bc1c..25c1d96929 100644 --- a/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py +++ b/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py @@ -39,5 +39,5 @@ def addboot(source,target,env): os.rename(target[0].path, firmware_without_bootloader_dir) #os.rename(target[0].dir.path+'/firmware_with_bootloader.bin', target[0].dir.path+'/firmware.bin') -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", addboot); +env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', addboot); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin.py b/buildroot/share/PlatformIO/scripts/mks_robin.py index 742f4cd173..fec6c0ea9b 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin.py @@ -27,4 +27,4 @@ def encrypt(source, target, env): finally: firmware.close() robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py index c11bbb37f6..4d28d3ff0c 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py @@ -27,4 +27,4 @@ def encrypt(source, target, env): finally: firmware.close() robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py index 2b3ba6f90d..5247eaf171 100755 --- a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py @@ -27,4 +27,4 @@ def encrypt(source, target, env): finally: firmware.close() robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py index eb8bca9b52..feb9b2e4e3 100755 --- a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py @@ -27,4 +27,4 @@ def encrypt(source, target, env): finally: firmware.close() robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);