Commit b92c930d authored by Natanael Copa's avatar Natanael Copa

libalpine: added die()

parent 9cca5488
...@@ -4,7 +4,6 @@ PREFIX=@PREFIX@ ...@@ -4,7 +4,6 @@ PREFIX=@PREFIX@
PROGRAM=`basename $0` PROGRAM=`basename $0`
echon () { echon () {
if [ X"$ECHON" = X ]; then if [ X"$ECHON" = X ]; then
# Determine how to "echo" without newline: "echo -n" # Determine how to "echo" without newline: "echo -n"
...@@ -36,6 +35,12 @@ eecho() { ...@@ -36,6 +35,12 @@ eecho() {
echo "$@" >&2 echo "$@" >&2
} }
# echo to stderr and exit with error
die() {
eecho "$@"
exit 1
}
init_tmpdir() { init_tmpdir() {
local omask=`umask` local omask=`umask`
local __tmpd="/tmp/$PROGRAM-${$}-`date +%s`-$RANDOM" local __tmpd="/tmp/$PROGRAM-${$}-`date +%s`-$RANDOM"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment