瀏覽代碼

Adding list and info Borg sub-commands to find-unsupported-borg-options script.

Dan Helfman 7 年之前
父節點
當前提交
f1a143de5b
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      scripts/find-unsupported-borg-options

+ 4 - 2
scripts/find-unsupported-borg-options

@@ -1,5 +1,7 @@
 #!/bin/bash
 #!/bin/bash
 
 
+set -o nounset
+
 # For each Borg sub-command that borgmatic uses, print out the Borg flags that borgmatic does not
 # For each Borg sub-command that borgmatic uses, print out the Borg flags that borgmatic does not
 # appear to support yet. This script isn't terribly robust. It's intended as a basic tool to ferret
 # appear to support yet. This script isn't terribly robust. It's intended as a basic tool to ferret
 # out unsupported Borg options so that they can be considered for addition to borgmatic.
 # out unsupported Borg options so that they can be considered for addition to borgmatic.
@@ -11,10 +13,10 @@ generate-borgmatic-config --destination temp.yaml
 # from running borgmatic with the generated configuration. Then, collect the full set of available
 # from running borgmatic with the generated configuration. Then, collect the full set of available
 # Borg flags as reported by "borg --help" for that sub-command. Finally, compare the two lists of
 # Borg flags as reported by "borg --help" for that sub-command. Finally, compare the two lists of
 # flags to determine which Borg flags borgmatic doesn't yet support.
 # flags to determine which Borg flags borgmatic doesn't yet support.
-for sub_command in prune create check; do
+for sub_command in prune create check list info; do
     echo "********** borg $sub_command **********"
     echo "********** borg $sub_command **********"
 
 
-    for line in $(borgmatic --config temp.yaml --$sub_command -v 2 2>&1 | grep "borg $sub_command") ; do
+    for line in $(borgmatic --config temp.yaml --$sub_command -v 2 2>&1 | grep "borg\w* $sub_command") ; do
         echo "$line" | grep '^-' >> borgmatic_borg_flags
         echo "$line" | grep '^-' >> borgmatic_borg_flags
     done
     done
     sort borgmatic_borg_flags > borgmatic_borg_flags.sorted
     sort borgmatic_borg_flags > borgmatic_borg_flags.sorted