File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -110,9 +110,13 @@ function build_sketch(){ # build_sketch <fqbn> <path-to-ino> [extra-options]
110
110
function count_sketches() # count_sketches <examples-path>
111
111
{
112
112
local examples=" $1 "
113
+ rm -rf sketches.txt
114
+ if [ ! -d " $examples " ]; then
115
+ touch sketches.txt
116
+ return 0
117
+ fi
113
118
local sketches=$( find $examples -name * .ino)
114
119
local sketchnum=0
115
- rm -rf sketches.txt
116
120
for sketch in $sketches ; do
117
121
local sketchdir=$( dirname $sketch )
118
122
local sketchdirname=$( basename $sketchdir )
Original file line number Diff line number Diff line change @@ -27,10 +27,14 @@ function build_pio_sketch(){ # build_pio_sketch <board> <path-to-ino>
27
27
28
28
function count_sketches() # count_sketches <examples-path>
29
29
{
30
- local examples=" $1 "
30
+ local examples=" $1 "
31
+ rm -rf sketches.txt
32
+ if [ ! -d " $examples " ]; then
33
+ touch sketches.txt
34
+ return 0
35
+ fi
31
36
local sketches=$( find $examples -name * .ino)
32
37
local sketchnum=0
33
- rm -rf sketches.txt
34
38
for sketch in $sketches ; do
35
39
local sketchdir=$( dirname $sketch )
36
40
local sketchdirname=$( basename $sketchdir )
You can’t perform that action at this time.
0 commit comments