Check find's output in Jenkins' translation scripts.

* modules/jenkins/files/slave_scripts/propose_translation_update.sh:
Instead of evaluating find's output in test treat finds output as a
string and check if that string is null to determine if find found any
.po files. This is a more reliable way to check for the presence of .po
files as it does not result in confusing test.

* modules/jenkins/files/slave_scripts/upstream_translation_update.sh:
Instead of evaluating find's output in test treat finds output as a
string and check if that string is null to determine if find found any
.po files. This is a more reliable way to check for the presence of .po
files as it does not result in confusing test.

Change-Id: I53f7cc47e3762e4529eaf72f457852e650413b16
Reviewed-on: https://review.openstack.org/26346
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Clark Boylan 2013-04-07 20:35:43 -07:00 committed by Jenkins
parent bb964e64ef
commit 18275980f0
2 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,8 @@ tx set --auto-local -r ${PROJECT}.${PROJECT}-translations "${PROJECT}/locale/<la
tx pull -a
# Update the .pot file
python setup.py extract_messages
if [ find ${PROJECT}/locale -name '*.po' ]
PO_FILES=`find ${PROJECT}/locale -name '*.po'`
if [ -n "$PO_FILES" ]
then
# Use updated .pot file to update translations
python setup.py update_catalog

View File

@ -18,7 +18,8 @@ tx set --auto-local -r ${PROJECT}.${PROJECT}-translations "${PROJECT}/locale/<la
tx pull -a
# Update the .pot file
python setup.py extract_messages
if [ find ${PROJECT}/locale -name '*.po' ]
PO_FILES=`find ${PROJECT}/locale -name '*.po'`
if [ -n "$PO_FILES" ]
then
# Use updated .pot file to update translations
python setup.py update_catalog