Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 80b75cf

Browse files
committedJun 26, 2022
sketch_utils.sh: Get options from a JSON file.
Signed-off-by: Abdelatif Guettouche <[email protected]>
1 parent 8502cea commit 80b75cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎.github/scripts/sketch_utils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
9494
# precedence. Note that the following logic also falls to the default
9595
# parameters if no arguments were passed and no file was found.
9696

97-
if [ $options -eq 0 ] && [ -f $sketchdir/cfg ]; then
98-
opts=`cat $sketchdir/cfg`
97+
if [ $options -eq 0 ] && [ -f $sketchdir/cfg.json ]; then
98+
opts=`jq -r --arg chip $target '.targets[] | select(.name==$chip) | .fqbn' $sketchdir/cfg.json`
9999
else
100100
partition="PartitionScheme=$partition_opt"
101101
ff="FlashFreq=$ff_opt"

0 commit comments

Comments
 (0)
Please sign in to comment.