From c48bba869f3c33e68f3f9873b0027ff1cbab22fc Mon Sep 17 00:00:00 2001 From: Terry Geng Date: Sun, 1 Nov 2020 10:08:24 +0800 Subject: [PATCH] CI: Fix if statement. --- scripts/update_translation_to_server.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/update_translation_to_server.sh b/scripts/update_translation_to_server.sh index 75dbe4f..3a16b06 100755 --- a/scripts/update_translation_to_server.sh +++ b/scripts/update_translation_to_server.sh @@ -22,7 +22,7 @@ echo "=> Check if the modifications are based on the translations on the server. n=1 COMMON_FOUND=false -while [ $n -le 10 ]; do +while [ $n -le 20 ]; do echo "==> Comparing server's translations with master~$n ($(git show --oneline --quiet master~$n))" CHANGED_LANG_FILE=$(git diff --name-only master~$n | grep "lang/" || true) if [ -z "$CHANGED_LANG_FILE" ]; then @@ -31,10 +31,10 @@ while [ $n -le 10 ]; do else echo "==> Modified lang files: $CHANGED_LANG_FILE" fi - let n++ + (( n++ )) done -if [ ! $COMMON_FOUND ]; then +if (! $COMMON_FOUND); then echo "==> CONFLICTS: Previous commits doesn't share the same translations with the server." echo " There are unmerged translation updates on the server." echo " Please manually update these changes or wait for the pull request"