1
0
mirror of https://github.com/ru-de/faq.git synced 2024-11-09 12:11:02 +00:00

fix exit code

This commit is contained in:
Evgeniy Sokolov 2016-01-19 16:36:03 +01:00
parent c3fb3e7e63
commit 6e2e95c495

View File

@ -16,9 +16,10 @@ git diff HEAD^ --name-status | grep "^D" -v | sed 's/^.\t//g' > changed_files
while read FILE; do
echo -n "Проверка файла $FILE на опечатки... ";
OUTPUT=$(cat "$FILE" | sed "s/$DICT_REGEXP//g" | sed 's/https\?:[^ ]*//g' | sed "s/[(][^)]*\.md[)]//g" | hunspell -d russian-aot,ru_RU,de_DE,en_US | $DIR/spell-checker);
EXIT_CODE=$?
OUTPUT_EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
if [ $OUTPUT_EXIT_CODE -ne 0 ]; then
EXIT_CODE=1
echo "ошибка";
echo "$OUTPUT";
else