misc: fix spellchecker

When codespell automatically fixes the spelling error, the "Fixed"
message seems goes to stderr. Check both the output and diffs should
make it more robust.

Also need quote output variables.
Esse commit está contido em:
Hui Zhou
2021-04-25 17:49:41 -05:00
commit a50ceffed4
+4 -3
Ver Arquivo
@@ -45,9 +45,10 @@ do
if [[ -f $file && $file != *.tex ]]; then
cp -p ${file} ${TMP_FILENAME}
output=$(bash maint/spellcheck.sh ${file})
git --no-pager diff ${file} ${TMP_FILENAME}
if [ -n "$output" ] ; then
echo $output
diffs=$(git --no-pager diff ${file} ${TMP_FILENAME})
if test -n "$output" -o -n "$diffs" ; then
echo "$output"
echo "$diffs"
ret=1
fi
fi