1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-23 16:26:29 +00:00
borg/docs/update_usage.sh
Thomas Waldmann 7cbff6925f Documentation for 'attic serve'
Thanks to @lfam (attic PR #277 )!

Note: As I already had refactored a lot of these pathes you changed, it was easier
to just cherry pick the hunks with the other changes and apply them manually.
2015-05-14 17:36:53 +02:00

13 lines
481 B
Bash
Executable file

#!/bin/bash
if [ ! -d usage ]; then
mkdir usage
fi
for cmd in change-passphrase check create delete extract info init list mount prune serve; do
FILENAME="usage/$cmd.rst.inc"
LINE=`echo -n borg $cmd | tr 'a-z- ' '-'`
echo -e ".. _borg_$cmd:\n" > $FILENAME
echo -e "borg $cmd\n$LINE\n::\n\n" >> $FILENAME
borg help $cmd --usage-only | sed -e 's/^/ /' >> $FILENAME
echo -e "\nDescription\n~~~~~~~~~~~\n" >> $FILENAME
borg help $cmd --epilog-only >> $FILENAME
done