1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 09:47:58 +00:00
borg/docs/update_usage.sh

14 lines
481 B
Bash
Raw Normal View History

2014-03-09 14:12:07 +00:00
#!/bin/bash
2013-07-31 18:51:01 +00:00
if [ ! -d usage ]; then
mkdir usage
fi
for cmd in change-passphrase check create delete extract info init list mount prune serve; do
2013-07-31 18:51:01 +00:00
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
2014-04-06 13:16:25 +00:00
echo -e "\nDescription\n~~~~~~~~~~~\n" >> $FILENAME
borg help $cmd --epilog-only >> $FILENAME
2013-07-05 10:32:56 +00:00
done