File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 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
3232 $win_opts $xtra_opts " $sketch "
3333}
3434
35- function count_sketches(){ # count_sketches <path> < target>
35+ function count_sketches(){ # count_sketches <path> [ target]
3636 local path=$1
3737 local target=$2
3838
39- if [ $# -lt 2 ]; then
39+ if [ $# -lt 1 ]; then
4040 echo " ERROR: Illegal number of parameters"
41- echo " USAGE: ${0} count <path> < target> "
41+ echo " USAGE: ${0} count <path> [ target] "
4242 fi
4343
4444 rm -rf sketches.txt
@@ -55,7 +55,7 @@ function count_sketches(){ # count_sketches <path> <target>
5555 local sketchname=$( basename $sketch )
5656 if [[ " $sketchdirname .ino" != " $sketchname " ]]; then
5757 continue
58- elif [[ -f " $sketchdir /.skip.$target " ]]; then
58+ elif [[ -n $target ]] && [[ - f " $sketchdir /.skip.$target " ]]; then
5959 continue
6060 else
6161 echo $sketch >> sketches.txt
You can’t perform that action at this time.
0 commit comments