@@ -318,27 +318,28 @@ function install_libraries()
318
318
function install_arduino_cli()
319
319
{
320
320
local path=$1
321
+ local core_path=$2
321
322
322
323
local ver=' 1.2.2'
323
324
local urlbase=" https://github.com/arduino/arduino-cli/releases/download/v${ver} /arduino-cli_${ver} _"
324
325
325
326
echo " Arduino CLI ${ver} "
326
327
327
- mkdir -p ${cache_dir} /cli
328
- pushd ${cache_dir} /cli
328
+ mkdir -p ${core_path} /dist
329
+ pushd ${core_path} /dist
329
330
330
331
case " ${RUNNER_OS-} " in
331
- ( " Linux" )
332
+ " Linux" )
332
333
fetch_and_unpack " Linux_64bit.tar.gz" \
333
334
" d421e2b1cbef59c41e46cf06d077214a1d24cb784030462763781c9d3911cc55257fbcc02a7ee6a2ddda5b459101dc83aeda6b3b5198805bfdce856f82774c93" \
334
335
" ${urlbase} Linux_64bit.tar.gz"
335
336
;;
336
- ( " Windows" )
337
+ " Windows" )
337
338
fetch_and_unpack " Windows_64bit.zip" \
338
339
" 05b4eb5820fbaf670de00399d40513ecf2de9d0c2c5593a1227be03b2d11ba53e9d14cf6f934110447d6fd15c6a09769606a34fcab32ec3c2dbaa42f4627b072" \
339
340
" ${urlbase} Windows_64bit.zip"
340
341
;;
341
- ( " macOS" )
342
+ " macOS" )
342
343
if [ " ${RUNNER_ARCH-} " = " ARM64" ] ; then
343
344
fetch_and_unpack " macOS_ARM64.tar.gz" \
344
345
" 672693418b730d8ebc57cae2c892553e821706bee06312cc77a598e834afcba7d380df4d337138ecc03a4013a349d89b744b2a3b97fafc214b619856d9162827" \
@@ -349,7 +350,7 @@ function install_arduino_cli()
349
350
" ${urlbase} macOS_64bit.tar.gz"
350
351
fi
351
352
;;
352
- ( * )
353
+ * )
353
354
echo ' Unknown ${RUNNER_OS} = "' ${RUNNER_OS} ' "'
354
355
exit 2
355
356
esac
@@ -395,28 +396,36 @@ function install_core()
395
396
core_dir=$( dirname " $hardware_core_path " )
396
397
mkdir -p " $core_dir "
397
398
398
- if [ " ${RUNNER_OS-} " = " Windows" ]; then
399
- cp -a " $core_path " " ${core_dir} /esp8266"
400
- else
401
- ln -s " $core_path " " $hardware_core_path "
402
- fi
399
+ echo $core_dir
400
+ # find $core_dir
401
+
402
+ cp -a " $core_path " " ${core_dir} /esp8266"
403
+ # if [ "${RUNNER_OS-}" = "Windows" ]; then
404
+ # cp -a "$core_path" "${core_dir}/esp8266"
405
+ # else
406
+ # ln -s "$core_path" "$hardware_core_path"
407
+ # fi
408
+
409
+ # find $core_dir
403
410
}
404
411
405
412
function install_arduino()
406
413
{
414
+ set -x
407
415
echo ::group::Install arduino
408
416
local debug=$1
409
417
410
- command -v " ${ESP8266_ARDUINO_CLI} " \
411
- || install_arduino_cli " ${ESP8266_ARDUINO_CLI} "
412
-
413
418
local hardware_core_path=" $ESP8266_ARDUINO_HARDWARE /esp8266com/esp8266"
414
419
test -d " $hardware_core_path " \
415
420
|| install_core " $ESP8266_ARDUINO_BUILD_DIR " " $hardware_core_path " " $debug "
416
421
422
+ command -v " ${ESP8266_ARDUINO_CLI} " \
423
+ || install_arduino_cli " ${ESP8266_ARDUINO_CLI} " " $hardware_core_path "
424
+
417
425
install_libraries " $ESP8266_ARDUINO_BUILD_DIR " " $ESP8266_ARDUINO_LIBRARIES "
418
426
419
427
echo ::endgroup::
428
+ set +x
420
429
}
421
430
422
431
function arduino_lwip_menu_option()
0 commit comments