2021-05-12 19:11:42 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Checks the default messages.po file
|
|
|
|
#
|
|
|
|
|
|
|
|
# Skip first 4 lines in possible diff, because they're header
|
|
|
|
# Skip all lines of the git diff starting with "@@" or comments or starting "POT-Creation-Date"
|
|
|
|
if [[ $(git diff -U0 ./view/lang/C/messages.po | grep -vE '^(@@|\-"POT-Creation-Date|\+"POT-Creation-Date|\-#|\+#)' | wc -l) -gt 4 ]]; then
|
|
|
|
echo "$(git diff ./view/lang/C/messages.po)"
|
|
|
|
exit 1
|
|
|
|
else
|
2021-05-22 22:55:44 +02:00
|
|
|
echo "\033[1mNothing to update\033[0m"
|
2021-05-12 19:11:42 +02:00
|
|
|
fi
|