Only initialize transifex if there's no .tx directory

Some git repositories have .tx directories, most have none. Handle both
ways - check if .tx directory exists and create it with tx init if not.

Change-Id: I7035fd6d130aabe553678e8b7aec78d33333715f
This commit is contained in:
Andreas Jaeger 2014-03-19 19:56:43 +01:00
parent ba2f6468dd
commit c953e14ce4
4 changed files with 16 additions and 8 deletions

@ -40,8 +40,10 @@ EOF
set -e
fi
# initialize transifex client
tx init --host=https://www.transifex.com
# Initialize the transifex client, if there's no .tx directory
if [ ! -d .tx ] ; then
tx init --host=https://www.transifex.com
fi
tx set --auto-local -r ${PROJECT}.${PROJECT}-translations "${PROJECT}/locale/<lang>/LC_MESSAGES/${PROJECT}.po" --source-lang en --source-file ${PROJECT}/locale/${PROJECT}.pot -t PO --execute
# Pull all upstream translations

@ -50,8 +50,10 @@ EOF
set -e
fi
# Initialize transifex client
tx init --host=https://www.transifex.com
# Initialize the transifex client, if there's no .tx directory
if [ ! -d .tx ] ; then
tx init --host=https://www.transifex.com
fi
# Generate pot one by one
for FILE in ${DocFolder}/*

@ -22,8 +22,10 @@ fi
git config user.name "OpenStack Jenkins"
git config user.email "jenkins@openstack.org"
# initialize transifex client
tx init --host=https://www.transifex.com
# Initialize the transifex client, if there's no .tx directory
if [ ! -d .tx ] ; then
tx init --host=https://www.transifex.com
fi
tx set --auto-local -r ${PROJECT}.${PROJECT}-translations "${PROJECT}/locale/<lang>/LC_MESSAGES/${PROJECT}.po" --source-lang en --source-file ${PROJECT}/locale/${PROJECT}.pot -t PO --execute
# Pull all upstream translations

@ -31,8 +31,10 @@ fi
git config user.name "OpenStack Jenkins"
git config user.email "jenkins@openstack.org"
# Initialize transifex client
tx init --host=https://www.transifex.com
# Initialize the transifex client, if there's no .tx directory
if [ ! -d .tx ] ; then
tx init --host=https://www.transifex.com
fi
# Generate pot one by one
for FILE in ${DocFolder}/*