From 0136a6eb1714e935618d8b32fc4058980cd5e2d3 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 7 Jun 2018 09:58:32 -0300 Subject: Adds check and info options --- borger | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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 [--continuous|--list]" + echo "usage: $BASENAME [--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 -- cgit v1.2.3