summaryrefslogtreecommitdiff
path: root/src/rvs-core/lib/stdio.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/rvs-core/lib/stdio.sh')
-rw-r--r--src/rvs-core/lib/stdio.sh29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/rvs-core/lib/stdio.sh b/src/rvs-core/lib/stdio.sh
index aff22f1..57176e1 100644
--- a/src/rvs-core/lib/stdio.sh
+++ b/src/rvs-core/lib/stdio.sh
@@ -23,6 +23,25 @@ out() {
fi
}
+warn () {
+ echo "$name: $1" >> /dev/stderr
+}
+
+error() {
+ warn "$1"
+ cat << __error__ >> /dev/stderr
+Usage: $name $usage
+
+Try \`$name --help' for more options.
+__error__
+ exit 1
+}
+
+fatal () {
+ warn "$1"
+ exit 1
+}
+
version() {
echo "$name $ver"
if [ "$volume" != '-q' ]; then
@@ -39,13 +58,3 @@ __disclaimer__
exit 0
}
-error() {
- cat << __error__
-$name: $1
-Usage: $name $usage
-
-Try $name \`--help' for more options.
-__error__
- exit 1
-}
-