aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-07 09:58:32 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-07 09:58:32 -0300
commit0136a6eb1714e935618d8b32fc4058980cd5e2d3 (patch)
treeb5508d32c4f4e0b1c6e9f5d104b8f9e62e912db1
parente5887df51b69bfe0b789d83736d5eaa36dd51c01 (diff)
downloadborger-0136a6eb1714e935618d8b32fc4058980cd5e2d3.tar.gz
borger-0136a6eb1714e935618d8b32fc4058980cd5e2d3.tar.bz2
Adds check and info options
-rwxr-xr-xborger20
1 files changed, 19 insertions, 1 deletions
diff --git a/borger b/borger
index b16e1eb..1ba6389 100755
--- a/borger
+++ b/borger
@@ -29,7 +29,7 @@ function fatal {
# Display usage
function borger_usage {
- echo "usage: $BASENAME <destination> [--continuous|--list]"
+ echo "usage: $BASENAME <destination> [--continuous|--list|--check|--info]"
echo -n "available destinations from $BASE_CONFIG: "
ls $BASE_CONFIG
exit 1
@@ -90,6 +90,18 @@ function borger_list {
exit $?
}
+# Check
+function borger_check {
+ borg check
+ exit $?
+}
+
+# Info
+function borger_info {
+ borg info
+ exit $?
+}
+
# Our trap
function borger_trap {
trap 'info Backup interrupted >&2; exit 2' INT TERM
@@ -203,6 +215,12 @@ elif [ -z "$OPTION" ]; then
elif [ "$OPTION" == "--list" ]; then
borger_config
borger_list
+elif [ "$OPTION" == "--check" ]; then
+ borger_config
+ borger_check
+elif [ "$OPTION" == "--info" ]; then
+ borger_config
+ borger_info
elif [ "$OPTION" == "--continuous" ]; then
borger_config