po: correctly advertise whether new PO files have arrived

And don't bother running configure and make upstairs; here is enough.
master
Benno Schulenberg 2016-06-17 14:47:43 +02:00
parent a025878466
commit 8875acf912
1 changed files with 19 additions and 11 deletions

View File

@ -1,16 +1,24 @@
#!/bin/sh #!/bin/sh
# Execute this is the po/ subdir.
cd "$(dirname "$0")" || exit cd "$(dirname "$0")" || exit
echo "Updating translations via TP" && \
echo "Updating translations via TP"
rsync -Lrtvz translationproject.org::tp/latest/nano/ . rsync -Lrtvz translationproject.org::tp/latest/nano/ .
git add -v *.po
echo "Updating LINGUAS for all translations" # Are there now PO files that are not in git yet?
FILE=LINGUAS NEWSTUFF=$(git status --porcelain *.po | grep "^??")
echo "# List of available languages." >"${FILE}"
echo $(printf '%s\n' *.po | LC_ALL=C sort | sed 's/\.po//g') >>"${FILE}"
git add -v "${FILE}"
NEWSTUFF=$(git status --porcelain *.po)
if [ -n "${NEWSTUFF}" ]; then if [ -n "${NEWSTUFF}" ]; then
printf "New langs found, re-running configure and make at top level (silently)..." echo "New languages found; updating LINGUAS"
(cd .. && ./configure && make) >/dev/null echo "# List of available languages." >LINGUAS
echo "done" echo $(printf '%s\n' *.po | LC_ALL=C sort | sed 's/\.po//g') >>LINGUAS
fi fi
echo "Remerging and recompiling the PO files..."
make
#echo "Staging the files"
#git add -v nano.pot
#git add -v *.po
#git add -v LINGUAS