summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlibalpine.sh.in7
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"