]> arthur.barton.de Git - ax-unix.git/commitdiff
mail-wrapper: Redirect usage information to stderr
authorAlexander Barton <alex@barton.de>
Fri, 27 Oct 2017 10:33:11 +0000 (12:33 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 27 Oct 2017 10:33:11 +0000 (12:33 +0200)
mail/wrapper/mail-wrapper

index 045f94b97eb727183b89370f2c47f6f7b29723b9..7c5a19b98c2b5a358e1c817763f5a0402ad6f4ac 100755 (executable)
@@ -27,19 +27,21 @@ fi
 unset dir ax_common ax_common_sourced
 
 usage() {
-       echo >&2
-       echo "Usage:" >&2
-       echo "  $NAME [--help|--usage]" >&2
-       echo "  $NAME {parameters} [<command> [<arg> [<…>]]]" >&2
-       echo >&2
-       echo "  -C                      Use the \"C\" locale, no localized (error) messages." >&2
-       echo "  --errors|-e             Generate email on errors only." >&2
-       echo "  --from|-f               Email address of the sender of the email." >&2
-       echo "  --subject|-s <subject>  Subject for the email." >&2
-       echo "  --to|-t <address>       Email address to send the email to." >&2
-       echo >&2
-       echo "When no <command> is given, $NAME reads from standard input." >&2
-       echo >&2
+       {
+               echo
+               echo "Usage:"
+               echo "  $NAME [--help|--usage]"
+               echo "  $NAME {parameters} [<command> [<arg> [<…>]]]"
+               echo
+               echo "  -C                      Use the \"C\" locale, no localized (error) messages."
+               echo "  --errors|-e             Generate email on errors only."
+               echo "  --from|-f               Email address of the sender of the email."
+               echo "  --subject|-s <subject>  Subject for the email."
+               echo "  --to|-t <address>       Email address to send the email to."
+               echo
+               echo "When no <command> is given, $NAME reads from standard input."
+               echo
+       } >&2
        exit "${1:-0}"
 }