From 4896012a5dd904e88b45f63fd88cd740e3b7d63f Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Fri, 27 Oct 2017 12:36:09 +0200 Subject: [PATCH] Redirect error messages to stderr --- bup/save-user/bup-save-user | 4 ++-- lib/ax/README | 2 +- mail/wrapper/mail-wrapper | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bup/save-user/bup-save-user b/bup/save-user/bup-save-user index 9fd5bbf..aea3386 100755 --- a/bup/save-user/bup-save-user +++ b/bup/save-user/bup-save-user @@ -13,14 +13,14 @@ NAME=$(basename "$0") Usage() { - echo "Usage: $NAME"; echo + echo "Usage: $NAME" 2>&1; echo exit 1 } [ $# -eq 0 ] || Usage if [ ! -d "$HOME/.bup" ]; then - echo "$NAME: \"$HOME/.bup\" does not exist. Initialite it first!" + echo "$NAME: \"$HOME/.bup\" does not exist. Initialite it first!" >&2 exit 1 fi diff --git a/lib/ax/README b/lib/ax/README index 581418a..1b85fe0 100644 --- a/lib/ax/README +++ b/lib/ax/README @@ -25,7 +25,7 @@ for dir in "$HOME/lib" "$HOME/.ax" /usr/local /opt/ax /usr; do [ -r "$ax_common" ] && . "$ax_common" done if [ -z "$ax_common_sourced" ]; then - echo "Error ($(basename "$0")): \"ax-common.sh\" not found, aborting!" + echo "Error ($(basename "$0")): \"ax-common.sh\" not found, aborting!" >&2 echo "Please install 'ax-unix', \"Alex' UNIX Tools & Scripts\", and try again." exit 99 fi diff --git a/mail/wrapper/mail-wrapper b/mail/wrapper/mail-wrapper index 7c5a19b..e581c45 100755 --- a/mail/wrapper/mail-wrapper +++ b/mail/wrapper/mail-wrapper @@ -20,7 +20,7 @@ for dir in "$HOME/lib" "$HOME/.ax" /usr/local /opt/ax /usr; do [ -r "$ax_common" ] && . "$ax_common" done if [ -z "$ax_common_sourced" ]; then - echo "Error ($(basename "$0")): \"ax-common.sh\" not found, aborting!" + echo "Error ($NAME): \"ax-common.sh\" not found, aborting!" >&2 echo "Please install 'ax-unix', \"Alex' UNIX Tools & Scripts\", and try again." exit 99 fi -- 2.39.2