diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-21 13:08:12 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-21 13:08:12 +0000 |
commit | b92c930df4ed2f5dc749eba2f098294f4a934d30 (patch) | |
tree | a778b228c141617affa49ba9b33716527570baad | |
parent | 9cca548848c41d58024b02a4925b775d68a161dd (diff) | |
download | alpine-conf-b92c930df4ed2f5dc749eba2f098294f4a934d30.zip |
libalpine: added die()
-rwxr-xr-x | libalpine.sh.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libalpine.sh.in b/libalpine.sh.in index ce31dad..b47fa71 100755 --- a/libalpine.sh.in +++ b/libalpine.sh.in @@ -4,7 +4,6 @@ PREFIX=@PREFIX@ PROGRAM=`basename $0` - echon () { if [ X"$ECHON" = X ]; then # Determine how to "echo" without newline: "echo -n" @@ -36,6 +35,12 @@ eecho() { echo "$@" >&2 } +# echo to stderr and exit with error +die() { + eecho "$@" + exit 1 +} + init_tmpdir() { local omask=`umask` local __tmpd="/tmp/$PROGRAM-${$}-`date +%s`-$RANDOM" |