make_release: generate FAQ from chrony.txt

This commit is contained in:
Miroslav Lichvar
2014-06-27 16:05:43 +02:00
parent fbfd261da6
commit 41266cbaa0
3 changed files with 10 additions and 408 deletions

View File

@@ -59,6 +59,16 @@ if [ $(wc -l < INSTALL) -gt 100 -o $(wc -l < INSTALL) -lt 85 ]; then
exit 3
fi
awk '/^[1-9] Frequently asked questions$/{p=1}
/^Appendix A GNU General Public License$/{exit}; p' chrony.txt | \
tail -n +4 | sed 's/^[1-9]\.\([1-9]\)/\1/' | sed 's/^----/--/' | \
sed 's/^====/==/' > FAQ
if [ $(wc -l < FAQ) -gt 400 -o $(wc -l < FAQ) -lt 200 ]; then
echo "FAQ generated incorrectly?"
exit 3
fi
rm -f config.h config.log faqgen.pl make_release chrony.spec.sample .gitignore
cd ..