bin/update: Fix early exit if no changes are found

This commit is contained in:
Johannes Meyer 2020-04-28 11:21:36 +02:00
parent 5891a90f3f
commit cbf2239818
1 changed files with 7 additions and 2 deletions

View File

@ -90,8 +90,13 @@ for repo_name in "${FETCHED_REPOS[@]}"; do
done
# Check for changes (new messages) that need to be committed
CHANGES=$(git diff -U0 | grep -Pe '^[+-]{1}[^+-]+' | grep -v -e '."Project-Id-Version:' -e '."POT-Creation-Date:');
if [ -z "$CHANGES" ]; then
CHANGES=1
git diff -U0 \
| grep -Pe '^[+-]{1}[^+-]+' \
| grep -qv -e '."Project-Id-Version:' -e '."POT-Creation-Date:' \
|| CHANGES=0
if [ ! $CHANGES ]; then
echo "No new messages found.";
git checkout icinga.pot;
else