File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <fqbn> <path-to-i
32
32
$win_opts $xtra_opts " $sketch "
33
33
}
34
34
35
- function count_sketches(){ # count_sketches <path> < target>
35
+ function count_sketches(){ # count_sketches <path> [ target]
36
36
local path=$1
37
37
local target=$2
38
38
39
- if [ $# -lt 2 ]; then
39
+ if [ $# -lt 1 ]; then
40
40
echo " ERROR: Illegal number of parameters"
41
- echo " USAGE: ${0} count <path> < target> "
41
+ echo " USAGE: ${0} count <path> [ target] "
42
42
fi
43
43
44
44
rm -rf sketches.txt
@@ -55,7 +55,7 @@ function count_sketches(){ # count_sketches <path> <target>
55
55
local sketchname=$( basename $sketch )
56
56
if [[ " $sketchdirname .ino" != " $sketchname " ]]; then
57
57
continue
58
- elif [[ -f " $sketchdir /.skip.$target " ]]; then
58
+ elif [[ -n $target ]] && [[ - f " $sketchdir /.skip.$target " ]]; then
59
59
continue
60
60
else
61
61
echo $sketch >> sketches.txt
You can’t perform that action at this time.
0 commit comments