mirror of https://github.com/Icinga/L10n.git
bin/update: Fix early exit if no changes are found
This commit is contained in:
parent
5891a90f3f
commit
cbf2239818
bin
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue