兼容新模板

This commit is contained in:
darksun 2018-12-05 21:12:35 +08:00
parent fdbc009909
commit 95de478908

View File

@ -49,11 +49,11 @@ for catalog in "$@";do
num=$(count_files_under_dir "${catalog}" "[0-9]*.md")
;;
translating)
num=$(git grep -niE "translat|fanyi|翻译" sources/*.md |awk -F ":" '{if ($2<=3) print $1}' |wc -l)
num=$(git grep -niE "^[^[].*translat|^\[#\]: translator: \([^[:space:]]+\)|fanyi|翻译" sources/*.md |awk -F ":" '{if ($2<=3) print $1}'|wc -l)
;;
sources)
total=$(count_files_under_dir "${catalog}" "[0-9]*.md")
translating_num=$(git grep -niE "translat|fanyi|翻译" sources/*.md |awk -F ":" '{if ($2<=3) print $1}' |wc -l)
translating_num=$(git grep -niE "^[^[].*translat|^\[#\]: translator: \([^[:space:]]+\)|fanyi|翻译" sources/*.md |awk -F ":" '{if ($2<=3) print $1}'|wc -l)
num=$((${total} - ${translating_num}))
;;
*)