74
74
local elf_file=$2
75
75
76
76
local elf_name
77
- elf_name=$( basename $elf_file )
77
+ elf_name=$( basename " $elf_file " )
78
78
$size --format=sysv " $elf_file " | \
79
79
awk -v sketch_name=" ${elf_name% .* } " " $awk_script " -
80
80
}
@@ -251,8 +251,8 @@ function install_library()
251
251
local url=$6
252
252
253
253
fetch_and_unpack " $archive " " $hash " " $url "
254
- mkdir -p " $lib_path "
255
- rm -rf " $lib_path / $ name"
254
+ mkdir -p " ${ lib_path:? } "
255
+ rm -rf " ${ lib_path} / ${ name:? } "
256
256
mv " $extract " " $lib_path /$name "
257
257
}
258
258
@@ -264,7 +264,7 @@ function install_libraries()
264
264
mkdir -p " $core_path " /tools/dist
265
265
pushd " $core_path " /tools/dist
266
266
267
- source " $root /tests/dep-libraries.sh"
267
+ source " ${ root:? } " /tests/dep-libraries.sh
268
268
269
269
popd
270
270
}
@@ -279,14 +279,17 @@ function install_arduino_cli()
279
279
280
280
echo " Arduino CLI ${ver} "
281
281
282
- mkdir -p ${core_path} /dist
283
- pushd ${core_path} /dist
282
+ mkdir -p " ${core_path} " /dist
283
+ pushd " ${core_path} " /dist
284
284
285
285
source " $root /tests/dep-arduino-cli.sh"
286
286
287
- mkdir -p $( dirname $path )
288
- cp -v arduino-cli $path
289
- chmod +x $path
287
+ local path_dir
288
+ path_dir=$( dirname " $path " )
289
+
290
+ mkdir -p " $path_dir "
291
+ cp -v arduino-cli " $path "
292
+ chmod +x " $path "
290
293
291
294
popd
292
295
}
@@ -311,7 +314,7 @@ function install_core()
311
314
" compiler.c.extra_flags=-Wall -Wextra $debug_flags " \
312
315
" compiler.cpp.extra_flags=-Wall -Wextra $debug_flags " \
313
316
" recipe.hooks.prebuild.1.pattern=\" {runtime.tools.python3.path}/python3\" -I \" {runtime.tools.makecorever}\" --git-root \" {runtime.platform.path}\" --version \" {version}\" \" {runtime.platform.path}/cores/esp8266/core_version.h\" " \
314
- > ${core_path} /platform.local.txt
317
+ > " ${core_path} " /platform.local.txt
315
318
echo -e " \n----platform.local.txt----"
316
319
cat platform.local.txt
317
320
echo -e " \n----\n"
@@ -432,7 +435,7 @@ function install_platformio()
432
435
433
436
local board=$1
434
437
435
- pushd $ESP8266_ARDUINO_BUILD_DIR /tools
438
+ pushd " $ESP8266_ARDUINO_BUILD_DIR " /tools
436
439
python3 get.py -q
437
440
popd
438
441
@@ -446,7 +449,7 @@ function install_platformio()
446
449
local toolchain_symlink=" toolchain-xtensa @ symlink://${ESP8266_ARDUINO_BUILD_DIR} /tools/xtensa-lx106-elf/"
447
450
448
451
# pre-generate config; pio-ci with multiple '-O' options replace each other instead of appending to the same named list
449
- cat << EOF > $cache_dir /platformio.ini
452
+ cat << EOF > " $cache_dir " /platformio.ini
450
453
[platformio]
451
454
lib_dir =
452
455
${ESP8266_ARDUINO_LIBRARIES}
0 commit comments