write errors to stderr to show them on redirect

pull/17/head
Jarek Lipski 2019-02-10 11:17:40 +01:00
rodzic ca82688506
commit 222b9b170e
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -1,8 +1,8 @@
#!/bin/sh
usage() {
echo "Usage: volume-backup <backup|restore> <archive or - for stdin/stdout>"
exit
>&2 echo "Usage: volume-backup <backup|restore> <archive or - for stdin/stdout>"
exit 1
}
backup() {
@ -16,7 +16,7 @@ backup() {
restore() {
if ! [ "$ARCHIVE" == "-" ]; then
if ! [ -e $ARCHIVE_PATH ]; then
echo "Archive file $ARCHIVE does not exist"
>&2 echo "Archive file $ARCHIVE does not exist"
exit 1
fi
fi