Print to STDERR when dying
Signed-off-by: Teemu Matilainen <teemu.matilainen@reaktor.fi>
This commit is contained in:
parent
5ce22e135d
commit
d8179f09bf
|
@ -49,7 +49,7 @@ fi
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
# arg check
|
# arg check
|
||||||
die() { echo "$@"; exit 1; }
|
die() { echo "$@"; exit 1; } >&2
|
||||||
cd $HOME # if he didn't *start* there, it's his bloody fault
|
cd $HOME # if he didn't *start* there, it's his bloody fault
|
||||||
[ -f "$1" ] || [ "$1" = "rewind" ] || die "need a valid file or 'rewind'"
|
[ -f "$1" ] || [ "$1" = "rewind" ] || die "need a valid file or 'rewind'"
|
||||||
if [ "$1" = "rewind" ]
|
if [ "$1" = "rewind" ]
|
||||||
|
|
|
@ -73,7 +73,7 @@ cleanup() {
|
||||||
# service functions
|
# 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() {
|
prompt() {
|
||||||
# receives two arguments. A short piece of text to be displayed, without
|
# 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*
|
# pausing, in "quiet" mode, and a much longer one to be displayed, *with*
|
||||||
|
|
|
@ -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
|
# pubkey file if you happen to have lost all gitolite-access to the repos (but
|
||||||
# do have shell access via some other means)
|
# do have shell access via some other means)
|
||||||
|
|
||||||
die() { echo "$@"; exit 1; }
|
die() { echo "$@"; exit 1; } >&2
|
||||||
|
|
||||||
TEMPDIR=$(mktemp -d -t tmp.XXXXXXXXXX)
|
TEMPDIR=$(mktemp -d -t tmp.XXXXXXXXXX)
|
||||||
export TEMPDIR
|
export TEMPDIR
|
||||||
|
|
|
@ -16,7 +16,7 @@ usage() { echo "
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
die() { echo "$@"; echo; usage; exit 1; }
|
die() { echo "$@"; echo; usage; exit 1; } >&2
|
||||||
|
|
||||||
[ -z "$3" ] && usage
|
[ -z "$3" ] && usage
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
# END USAGE
|
# END USAGE
|
||||||
|
|
||||||
|
|
||||||
die() { echo "$@"; exit 1; }
|
die() { echo "$@"; exit 1; } >&2
|
||||||
|
|
||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue