trans-coord-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trans-coord/gnun/server/gnun mailfail.in


From: Ineiev
Subject: trans-coord/gnun/server/gnun mailfail.in
Date: Mon, 8 Nov 2021 03:05:53 -0500 (EST)

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Changes by:     Ineiev <ineiev> 21/11/08 03:05:53

Modified files:
        gnun/server/gnun: mailfail.in 

Log message:
        Improve comments.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/mailfail.in?cvsroot=trans-coord&r1=1.3&r2=1.4

Patches:
Index: mailfail.in
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/mailfail.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- mailfail.in 29 Jun 2016 16:13:27 -0000      1.3
+++ mailfail.in 8 Nov 2021 08:05:53 -0000       1.4
@@ -1,7 +1,7 @@
 #! @BASH@
 
 # Copyright (C) 2008, 2009, 2010, 2011, 2012,
-#   2013, 2016 Free Software Foundation, Inc.
+#   2013, 2016, 2021 Free Software Foundation, Inc.
 
 # This file is part of GNUnited Nations.
 
@@ -24,7 +24,7 @@
 #
 # Example:
 #
-# ./mailfail kaloian@doganov.org "Invalid HTML" ./validate article.html
+# ./mailfail trans-coord-logs@gnu.org "Invalid PO" msgfmt -c article.cv.po
 
 function usage() {
     echo 1>&2 Usage: ./mailfail [--dry-run] RCPT SUBJECT CMD [ARG ...]
@@ -33,7 +33,6 @@
 
 [ $# -gt 0 ] || usage
 
-# Read arguments
 DRY_RUN=""
 if [ "$1" == "--dry-run" ]; then
     [ $# -ge 4 ] || usage
@@ -52,15 +51,14 @@
 TMP=`@MKTEMP@ gnun.mailfail.XXXXXX`
 trap "rm -f $TMP" EXIT
 
-# Execute the command and capture it's output
-"$@" &>"$TMP"
+# Execute the command and capture its output.
+"$@" &> "$TMP"
 CMDSTATUS=$?
 cat "$TMP"
 
-# Mail the captured output, if needed
+# Mail the captured output, if needed.
 if [ -z "$DRY_RUN" ] && [ "$CMDSTATUS" -ne 0 ]; then
     @MAIL@ "$RCPT" -s "$SUBJECT" < "$TMP"
 fi
 
-# Exit with command's original exit status.
 exit $CMDSTATUS



reply via email to

[Prev in Thread] Current Thread [Next in Thread]