texlive[49409] Master/tlpkg/bin/tl-update-messages: remove temp files
commits+karl at tug.org
commits+karl at tug.org
Fri Dec 14 00:17:45 CET 2018
Revision: 49409
http://tug.org/svn/texlive?view=revision&revision=49409
Author: karl
Date: 2018-12-14 00:17:44 +0100 (Fri, 14 Dec 2018)
Log Message:
-----------
remove temp files whether or not pot has changed
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tl-update-messages
Modified: trunk/Master/tlpkg/bin/tl-update-messages
===================================================================
--- trunk/Master/tlpkg/bin/tl-update-messages 2018-12-13 23:12:47 UTC (rev 49408)
+++ trunk/Master/tlpkg/bin/tl-update-messages 2018-12-13 23:17:44 UTC (rev 49409)
@@ -47,22 +47,28 @@
$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
-
-exit $?
+exit $failed
More information about the tex-live-commits
mailing list