borg/docs/update_usage.sh

14 lines
480 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; do
2013-07-31 18:51:01 +00:00
FILENAME="usage/$cmd.rst.inc"
2013-08-04 19:23:12 +00:00
LINE=`echo -n attic $cmd | tr 'a-z- ' '-'`
2013-08-04 20:50:34 +00:00
echo -e ".. _attic_$cmd:\n" > $FILENAME
echo -e "attic $cmd\n$LINE\n::\n\n" >> $FILENAME
2014-04-06 13:16:25 +00:00
attic help $cmd --usage-only | sed -e 's/^/ /' >> $FILENAME
echo -e "\nDescription\n~~~~~~~~~~~\n" >> $FILENAME
attic help $cmd --epilog-only >> $FILENAME
2013-07-05 10:32:56 +00:00
done