summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-05-14 08:18:41 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2020-05-14 08:21:52 -0400
commitfeb283dbd967fd0e9297add0f74f3a8df81cbe5a (patch)
tree8f91e978ae017d365ec162e96f0a47162cce491f
parent85378ebaac2ce5542814c2347da28c9b5ddcaa54 (diff)
bugfix check.sh results
-rwxr-xr-xcheck.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/check.sh b/check.sh
index 7de5a92..31ab574 100755
--- a/check.sh
+++ b/check.sh
@@ -62,8 +62,8 @@ fi
# summary
totals=$(wc -l *.txt | sed 's|\(.*\)|\t\1|')
-n_unsourced=$(wc -l <<<${unsourced})
-n_malformed=$(wc -l <<<${invalid} )
+n_unsourced=$( [[ "${unsourced}" ]] && wc -l <<<${unsourced} || echo 0 )
+n_malformed=$( [[ "${invalid}" ]] && wc -l <<<${invalid} || echo 0 )
echo -e "summary:\n\t* number of entries total:\n${totals}"
(( ${n_malformed} )) && echo -e "\t* number of entries improperly formatted: ${n_malformed}"
(( ${n_unsourced} )) && echo -e "\t* number of entries needing citation: ${n_unsourced}"