diff options
author | Karl Berry <karl@freefriends.org> | 2018-12-13 23:17:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-12-13 23:17:44 +0000 |
commit | e69f0b4add2631161752438c5fb8565d39b8635d (patch) | |
tree | 3bc263678bb12c7904af66c7056c6e01312cb323 | |
parent | c74725ee58bb59d1fd6f82c78dac54033b642839 (diff) |
remove temp files whether or not pot has changed
git-svn-id: svn://tug.org/texlive/trunk@49409 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Master/tlpkg/bin/tl-update-messages | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/Master/tlpkg/bin/tl-update-messages b/Master/tlpkg/bin/tl-update-messages index 9ef038e99ec..15330d9e065 100755 --- a/Master/tlpkg/bin/tl-update-messages +++ b/Master/tlpkg/bin/tl-update-messages @@ -47,22 +47,28 @@ xgettext -o tlpkg/translations/messages.pot \ $tmpfile cd $transdir || exit 1 +failed=0 + tmpa=`mktemp` tmpb=`mktemp` sed /POT-Creation-Date:/d <messages.prev >$tmpa sed /POT-Creation-Date:/d <messages.pot >$tmpb + if cmp -s $tmpa $tmpb; then echo "$0: no msg changes." mv messages.prev messages.pot - rm -f $tmpa $tmpb - exit 0 +else + # we get here only if there have been changes. + for i in *.po; do + printf "$i " + msgmerge --backup=none --no-fuzzy-matching --update $i messages.pot + if test $? -ne 0; then + echo "$0: msgmerge failed: $i" >&2 + failed=`expr $failed + 1` + fi + done fi -rm -f $tmpfile $tmpa $tmpb messages.prev -# here we come only if there have been changes -for i in *.po; do - printf "$i " - msgmerge --backup=none --no-fuzzy-matching --update $i messages.pot -done +rm -f $tmpfile $tmpa $tmpb messages.prev -exit $? +exit $failed |