File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ function debug() {
2727 :
2828}
2929
30+ function wc_hits() {
31+ { grep " $1 " " $2 " || : ; } | wc -l
32+ }
33+
3034
3135function setup_containers() {
3236 if [ -e code/containers ]; then
@@ -303,17 +307,17 @@ study-show-save)
303307 studyshow=" $studydir /.git/study-show"
304308 $0 study-show " $study " > | " $studyshow .sh" 2> | " $studyshow .stderr"
305309 [ -s " $studyshow .stderr" ] || rm -f " $studyshow .stderr"
306- $0 study-show-summary " $study "
310+ $0 study-show-summary " $study " || echo " study-show-summary $study errored out, continuing " >&2
307311 fi
308312 exit 0
309313 ;;
310314study-show-summary)
311315 # to be used in conjunction with lists-update-summary-shows or just by itself
312316 studyshow=" $bidsdir /$2 /.git/study-show"
313- todo=$( grep ' ^heudiconv ' " $studyshow .sh" | wc -l )
314- warnings=$( grep ' WARNING: ' " $studyshow .sh" | wc -l )
315- fixups=$( grep ' !!!' " $studyshow .sh" | wc -l )
316- don=$( grep ' #.* done ' " $studyshow .sh" | wc -l )
317+ todo=$( wc_hits ' ^heudiconv ' " $studyshow .sh" )
318+ warnings=$( wc_hits ' WARNING: ' " $studyshow .sh" )
319+ fixups=$( wc_hits ' !!!' " $studyshow .sh" )
320+ don=$( wc_hits ' #.* done ' " $studyshow .sh" )
317321 echo -n " todo=$todo done=$don "
318322 if [ $fixups -gt 0 ]; then
319323 echo -n " fixups=$fixups "
You can’t perform that action at this time.
0 commit comments