texlive[50434] Master/tlpkg/bin/tl-update-messages: do not use sh -e.

commits+karl at tug.org commits+karl at tug.org
Sun Mar 17 23:40:20 CET 2019


Revision: 50434
          http://tug.org/svn/texlive?view=revision&revision=50434
Author:   karl
Date:     2019-03-17 23:40:20 +0100 (Sun, 17 Mar 2019)
Log Message:
-----------
do not use sh -e.

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tl-update-messages

Modified: trunk/Master/tlpkg/bin/tl-update-messages
===================================================================
--- trunk/Master/tlpkg/bin/tl-update-messages	2019-03-17 22:39:02 UTC (rev 50433)
+++ trunk/Master/tlpkg/bin/tl-update-messages	2019-03-17 22:40:20 UTC (rev 50434)
@@ -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 @@
 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 @@
        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 @@
     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



More information about the tex-live-commits mailing list