]> gitweb.fluxo.info Git - borger.git/commitdiff
Adds check and info options
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Jun 2018 12:58:32 +0000 (09:58 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Jun 2018 12:58:32 +0000 (09:58 -0300)
borger

diff --git a/borger b/borger
index b16e1ebf6d70da6c8a4c7524303657737193eecf..1ba6389b7ec20a6d6552d0c609048dd6f99d8d03 100755 (executable)
--- 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