summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rvs-core/lib/stdio.sh29
-rw-r--r--src/rvs.sh1
2 files changed, 20 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
-}
-
diff --git a/src/rvs.sh b/src/rvs.sh
index 518f487..5059dca 100644
--- a/src/rvs.sh
+++ b/src/rvs.sh
@@ -24,6 +24,7 @@ case "$com" in
*)
if [ -f "$RVSDIR/$com" ]; then
export TMPDIR="$repo/tmp"
+ #echo "$@" >> $repo/log
$RVSDIR/$@
else
error "unrecognized command \`$com'"