kopia lustrzana https://github.com/loomchild/volume-backup
write errors to stderr to show them on redirect
rodzic
ca82688506
commit
222b9b170e
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: volume-backup <backup|restore> <archive or - for stdin/stdout>"
|
>&2 echo "Usage: volume-backup <backup|restore> <archive or - for stdin/stdout>"
|
||||||
exit
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
backup() {
|
backup() {
|
||||||
|
@ -16,7 +16,7 @@ backup() {
|
||||||
restore() {
|
restore() {
|
||||||
if ! [ "$ARCHIVE" == "-" ]; then
|
if ! [ "$ARCHIVE" == "-" ]; then
|
||||||
if ! [ -e $ARCHIVE_PATH ]; then
|
if ! [ -e $ARCHIVE_PATH ]; then
|
||||||
echo "Archive file $ARCHIVE does not exist"
|
>&2 echo "Archive file $ARCHIVE does not exist"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Ładowanie…
Reference in New Issue