From 7ddd7b74d063f174bc3a72d5db4975edb0163f39 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 3 Oct 2014 08:37:33 +0200 Subject: [PATCH] Fix common_translation_update Use "git rm -f" to force removal. We might have files that were changed by the previous steps and then "git rm" will fail with: $ git rm heat/locale/fr/LC_MESSAGES/heat-log-warning.po error: 'heat/locale/fr/LC_MESSAGES/heat-log-warning.po' has changes staged in the index | (use --cached to keep the file, or -f to force removal) This change is needed to fix propose_translation_update.sh for a few repositories including heat. Change-Id: Ia5887a0442a25d6bd66351f266cb392cb46ca4d5 --- jenkins/scripts/common_translation_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/scripts/common_translation_update.sh b/jenkins/scripts/common_translation_update.sh index 336ea7824e..5f38473c0f 100644 --- a/jenkins/scripts/common_translation_update.sh +++ b/jenkins/scripts/common_translation_update.sh @@ -314,7 +314,7 @@ function cleanup_po_files { check="^0 translated messages" if [[ $trans =~ $check ]] ; then # Nothing is translated, remove the file. - git rm $i + git rm -f $i else if [[ $trans =~ " translated message" ]] ; then trans_no=`echo $trans|sed -e 's/ translated message.*$//'` @@ -334,7 +334,7 @@ function cleanup_po_files { # For now we delete files that suddenly are less than 20 # per cent translated. if [[ "$ratio" -lt "20" ]] ; then - git rm $i + git rm -f $i fi fi done