Print to STDERR when dying

Signed-off-by: Teemu Matilainen <teemu.matilainen@reaktor.fi>
This commit is contained in:
Teemu Matilainen 2010-11-16 18:19:19 +02:00 committed by Sitaram Chamarty
parent 5ce22e135d
commit d8179f09bf
5 changed files with 5 additions and 5 deletions

View file

@ -49,7 +49,7 @@ fi
# ------------------------------------------------------------------------
# arg check
die() { echo "$@"; exit 1; }
die() { echo "$@"; exit 1; } >&2
cd $HOME # if he didn't *start* there, it's his bloody fault
[ -f "$1" ] || [ "$1" = "rewind" ] || die "need a valid file or 'rewind'"
if [ "$1" = "rewind" ]

View file

@ -73,7 +73,7 @@ cleanup() {
# service functions
# ----------------------------------------------------------------------
die() { echo "$@"; echo; echo "run $0 without any arguments for help and tips"; cleanup; exit 1; }
die() { echo "$@"; echo; echo "run $0 without any arguments for help and tips"; cleanup; exit 1; } >&2
prompt() {
# receives two arguments. A short piece of text to be displayed, without
# pausing, in "quiet" mode, and a much longer one to be displayed, *with*

View file

@ -18,7 +18,7 @@ GL_PACKAGE_CONF=/tmp/share/gitolite/conf
# pubkey file if you happen to have lost all gitolite-access to the repos (but
# do have shell access via some other means)
die() { echo "$@"; exit 1; }
die() { echo "$@"; exit 1; } >&2
TEMPDIR=$(mktemp -d -t tmp.XXXXXXXXXX)
export TEMPDIR

View file

@ -16,7 +16,7 @@ usage() { echo "
exit 1;
}
die() { echo "$@"; echo; usage; exit 1; }
die() { echo "$@"; echo; usage; exit 1; } >&2
[ -z "$3" ] && usage

View file

@ -26,7 +26,7 @@
# END USAGE
die() { echo "$@"; exit 1; }
die() { echo "$@"; exit 1; } >&2
if [ -z "$1" ]
then