]> gitweb.fluxo.info Git - borger.git/commitdiff
Feat: adds repair option
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 14 Jul 2024 13:39:30 +0000 (10:39 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 14 Jul 2024 13:39:30 +0000 (10:39 -0300)
borger

diff --git a/borger b/borger
index 899b738fd7674c491270baf507145022b7b91f49..c2b8c0d745b8c60fbcb02181adfea2c084cea87c 100755 (executable)
--- a/borger
+++ b/borger
@@ -110,6 +110,12 @@ function borger_check {
   exit $?
 }
 
+# Repair
+function borger_repair {
+  borg check --repair
+  exit $?
+}
+
 # Info
 function borger_info {
   borg info
@@ -377,6 +383,9 @@ elif [ "$OPTION" == "--list" ]; then
 elif [ "$OPTION" == "--check" ]; then
   borger_config
   borger_check
+elif [ "$OPTION" == "--repair" ]; then
+  borger_config
+  borger_repair
 elif [ "$OPTION" == "--info" ]; then
   borger_config
   borger_info