summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/tlpkg/bin/tl-update-messages17
1 files changed, 8 insertions, 9 deletions
diff --git a/Master/tlpkg/bin/tl-update-messages b/Master/tlpkg/bin/tl-update-messages
index c44779e1c41..4d290326cd4 100755
--- a/Master/tlpkg/bin/tl-update-messages
+++ b/Master/tlpkg/bin/tl-update-messages
@@ -1,8 +1,8 @@
-#!/bin/sh -e
+#!/bin/sh
# $Id$
# Public domain. Originally written 2009, Norbert Preining.
#
-# update the master messages.pot catalog and merge the result into the
+# Update the master messages.pot catalog and merge the result into the
# respective .po files.
mydir=`cd \`dirname $0\` && /bin/pwd`
@@ -11,11 +11,11 @@ transdir=$Master/tlpkg/translations
tmpfile=$Master/tlpkg/translations/shortdesc.pl
cd $Master || exit 1
-cp $transdir/messages.pot $transdir/messages.prev
+cp $transdir/messages.pot $transdir/messages.prev || exit 1
sed -n 's/^shortdesc \(.*\)/__("\1");/p' \
tlpkg/tlpsrc/scheme-*.tlpsrc \
tlpkg/tlpsrc/collection-*.tlpsrc \
- >$tmpfile
+ >$tmpfile || exit 1
#
cat install-tl >>$tmpfile
#
@@ -33,7 +33,7 @@ xgettext -o tlpkg/translations/messages.pot \
tlpkg/installer/install-tl-gui.tcl \
tlpkg/tltcl/tltcl.tcl \
texmf-dist/scripts/tlshell/tlshell.tcl \
- $tmpfile
+ $tmpfile || { echo "$0: xgettext failed, goodbye." >&2; exit 1; }
cd $transdir || exit 1
failed=0
@@ -53,14 +53,13 @@ else
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`
+ failed=1
fi
done
fi
-pwd
-ls -l $tmpfile $tmpa $tmpb messages.prev
-rm -v $tmpfile $tmpa $tmpb messages.prev
+rm $tmpfile $tmpa $tmpb
+test -r messages.prev && rm messages.prev
if test "$failed" != 0; then
echo "$0: exiting with bad status $failed." >&2