Somewhat more robust mechanism to find unsupported Borg arguments.
This commit is contained in:
parent
5e2a5494af
commit
c7f4200417
1 changed files with 14 additions and 8 deletions
|
@ -22,22 +22,28 @@ for sub_command in prune create check list info; do
|
||||||
sort borgmatic_borg_flags > borgmatic_borg_flags.sorted
|
sort borgmatic_borg_flags > borgmatic_borg_flags.sorted
|
||||||
mv borgmatic_borg_flags.sorted borgmatic_borg_flags
|
mv borgmatic_borg_flags.sorted borgmatic_borg_flags
|
||||||
|
|
||||||
for line in $(borg $sub_command --help | awk -v RS= '/^usage:/') ; do
|
for word in $(borg $sub_command --help | grep '^ -') ; do
|
||||||
# Exclude a bunch of flags that borgmatic actually supports, but don't get exercised by the
|
# Exclude a bunch of flags that borgmatic actually supports, but don't get exercised by the
|
||||||
# generated sample config, and also flags that don't make sense to support.
|
# generated sample config, and also flags that don't make sense to support.
|
||||||
echo "$line" | grep -- -- | sed -r 's/(\[|\])//g' \
|
echo "$word" | grep ^-- | sed -e 's/,$//' \
|
||||||
| grep -v '^-h$' \
|
|
||||||
| grep -v '^--archives-only$' \
|
| grep -v '^--archives-only$' \
|
||||||
|
| grep -v '^--critical$' \
|
||||||
|
| grep -v '^--debug$' \
|
||||||
|
| grep -v '^--dry-run$' \
|
||||||
|
| grep -v '^--error$' \
|
||||||
|
| grep -v '^--help$' \
|
||||||
|
| grep -v '^--info$' \
|
||||||
|
| grep -v '^--list$' \
|
||||||
|
| grep -v '^--nobsdflags$' \
|
||||||
|
| grep -v '^--pattern$' \
|
||||||
| grep -v '^--repository-only$' \
|
| grep -v '^--repository-only$' \
|
||||||
| grep -v '^--stats$' \
|
| grep -v '^--stats$' \
|
||||||
| grep -v '^--list$' \
|
| grep -v '^--verbose$' \
|
||||||
| grep -v '^--critical$' \
|
|
||||||
| grep -v '^--error$' \
|
|
||||||
| grep -v '^--warning$' \
|
| grep -v '^--warning$' \
|
||||||
| grep -v '^--info$' \
|
| grep -v '^-h$' \
|
||||||
| grep -v '^--debug$' \
|
|
||||||
>> all_borg_flags
|
>> all_borg_flags
|
||||||
done
|
done
|
||||||
|
|
||||||
sort all_borg_flags > all_borg_flags.sorted
|
sort all_borg_flags > all_borg_flags.sorted
|
||||||
mv all_borg_flags.sorted all_borg_flags
|
mv all_borg_flags.sorted all_borg_flags
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue