Pārlūkot izejas kodu

Fix Python scripts unhandled quotes (#14926)

Tanguy Pruvot 5 gadus atpakaļ
vecāks
revīzija
03df3f4a88

+ 3
- 2
buildroot/share/PlatformIO/scripts/alfawise_Ux0.py Parādīt failu

@@ -7,7 +7,7 @@ for define in env['CPPDEFINES']:
7 7
 env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000"))
8 8
 env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/alfawise_Ux0.ld")
9 9
 
10
-# Encrypt ${PROGNAME}.bin and save it as 'project.bin'
10
+# Rename ${PROGNAME}.bin and save it as 'project.bin' (No encryption on the Longer3D)
11 11
 def encrypt(source, target, env):
12 12
     import os
13 13
 
@@ -23,4 +23,5 @@ def encrypt(source, target, env):
23 23
     finally:
24 24
         firmware.close()
25 25
         marlin_alfa.close()
26
-env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);
26
+
27
+env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);

+ 3
- 3
buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py Parādīt failu

@@ -12,7 +12,7 @@ env.AddPostAction(
12 12
 	join("$BUILD_DIR","${PROGNAME}.elf"),
13 13
 	env.VerboseAction(" ".join([
14 14
 		"$OBJCOPY", "-O ihex", "$TARGET", # TARGET=.pio/build/fysetc_STM32F1/firmware.elf
15
-		"'" + join("$BUILD_DIR","${PROGNAME}.hex") + "'", # Note: $BUILD_DIR is a full path
15
+		"\"" + join("$BUILD_DIR","${PROGNAME}.hex") + "\"", # Note: $BUILD_DIR is a full path
16 16
 	]), "Building $TARGET"))
17 17
 
18 18
 # please keep $SOURCE variable, it will be replaced with a path to firmware
@@ -27,11 +27,11 @@ env.AddPostAction(
27 27
 UPLOAD_TOOL="stm32flash"
28 28
 platform = env.PioPlatform()
29 29
 if platform.get_package_dir("tool-stm32duino") != None:
30
-	UPLOAD_TOOL=expandvars("'" + join(platform.get_package_dir("tool-stm32duino"),"stm32flash","stm32flash") + "'")
30
+	UPLOAD_TOOL=expandvars("\"" + join(platform.get_package_dir("tool-stm32duino"),"stm32flash","stm32flash") + "\"")
31 31
 
32 32
 env.Replace(
33 33
 	UPLOADER=UPLOAD_TOOL,
34
-	UPLOADCMD=expandvars(UPLOAD_TOOL + " -v -i rts,-dtr,dtr $UPLOAD_PORT -R -w '" + join("$BUILD_DIR","${PROGNAME}.hex") + "'")
34
+	UPLOADCMD=expandvars(UPLOAD_TOOL + " -v -i rts,-dtr,dtr $UPLOAD_PORT -R -w \"" + join("$BUILD_DIR","${PROGNAME}.hex")+"\"")
35 35
 )
36 36
 
37 37
 # Python callback

+ 1
- 1
buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py Parādīt failu

@@ -39,5 +39,5 @@ def addboot(source,target,env):
39 39
 	os.rename(target[0].path, firmware_without_bootloader_dir)
40 40
 	#os.rename(target[0].dir.path+'/firmware_with_bootloader.bin', target[0].dir.path+'/firmware.bin')
41 41
 
42
-env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', addboot);
42
+env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", addboot);
43 43
 

+ 1
- 1
buildroot/share/PlatformIO/scripts/mks_robin.py Parādīt failu

@@ -27,4 +27,4 @@ def encrypt(source, target, env):
27 27
     finally:
28 28
         firmware.close()
29 29
         robin.close()
30
-env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);
30
+env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);

+ 1
- 1
buildroot/share/PlatformIO/scripts/mks_robin_lite.py Parādīt failu

@@ -27,4 +27,4 @@ def encrypt(source, target, env):
27 27
     finally:
28 28
         firmware.close()
29 29
         robin.close()
30
-env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);
30
+env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);

+ 1
- 1
buildroot/share/PlatformIO/scripts/mks_robin_mini.py Parādīt failu

@@ -27,4 +27,4 @@ def encrypt(source, target, env):
27 27
     finally:
28 28
         firmware.close()
29 29
         robin.close()
30
-env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);
30
+env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);

+ 1
- 1
buildroot/share/PlatformIO/scripts/mks_robin_nano.py Parādīt failu

@@ -27,4 +27,4 @@ def encrypt(source, target, env):
27 27
     finally:
28 28
         firmware.close()
29 29
         robin.close()
30
-env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);
30
+env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);

Notiek ielāde…
Atcelt
Saglabāt