diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-06-07 09:58:32 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-06-07 09:58:32 -0300 |
commit | 0136a6eb1714e935618d8b32fc4058980cd5e2d3 (patch) | |
tree | b5508d32c4f4e0b1c6e9f5d104b8f9e62e912db1 | |
parent | e5887df51b69bfe0b789d83736d5eaa36dd51c01 (diff) | |
download | borger-0136a6eb1714e935618d8b32fc4058980cd5e2d3.tar.gz borger-0136a6eb1714e935618d8b32fc4058980cd5e2d3.tar.bz2 |
Adds check and info options
-rwxr-xr-x | borger | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -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 |