2003-02-18 11:24:19 +00:00
|
|
|
#!/bin/sh
|
2002-08-20 00:01:52 +00:00
|
|
|
#
|
2003-03-02 17:42:37 +00:00
|
|
|
# $Id: make-faq,v 1.4 2003/03/02 17:42:28 jmayer Exp $
|
2002-08-20 00:01:52 +00:00
|
|
|
#
|
|
|
|
# Make-faq - Creates a plain text version of the Ethereal FAQ
|
|
|
|
# from http://www.ethereal.com/faq
|
|
|
|
|
2003-03-02 17:42:37 +00:00
|
|
|
# Split the FAQ every LINECOUNT lines so the strings don't become too long
|
|
|
|
# for # some compilers.
|
|
|
|
LINECOUNT=400
|
2002-08-20 00:01:52 +00:00
|
|
|
|
2003-03-02 17:42:37 +00:00
|
|
|
rm -f FAQ
|
|
|
|
cat >FAQ <<EOF
|
2002-08-20 00:01:52 +00:00
|
|
|
|
|
|
|
The Ethereal FAQ
|
|
|
|
|
|
|
|
Note: This is just an ASCII snapshot of the faq and may not be up to
|
|
|
|
date. Please go to http://www.ethereal.com/faq for the up to
|
2003-01-29 12:58:48 +00:00
|
|
|
date version. The version of this snapshot can be found at the
|
2002-08-20 00:01:52 +00:00
|
|
|
end of this document.
|
|
|
|
|
|
|
|
INDEX
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
lynx -dump -nolist "http://www.ethereal.com/faq" | sed -e '1,/INDEX/d' >>FAQ
|
|
|
|
|
2003-01-29 12:58:48 +00:00
|
|
|
# Create an #include'able version for gtk/help_dlg.c
|
2003-03-02 17:42:37 +00:00
|
|
|
rm -f FAQ.include FAQTMP*
|
|
|
|
split -l $LINECOUNT FAQ FAQTMP
|
|
|
|
NUM=0
|
|
|
|
echo "const char *faq_part[] = {" >>FAQ.include
|
|
|
|
for i in FAQTMP*; do
|
|
|
|
if [ $NUM -ne 0 ]; then
|
|
|
|
echo "," >>FAQ.include
|
|
|
|
echo >>FAQ.include
|
|
|
|
fi
|
|
|
|
sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$/\\n"/' <$i >>FAQ.include
|
|
|
|
NUM=`expr $NUM + 1`
|
|
|
|
done
|
|
|
|
echo "};" >>FAQ.include
|
|
|
|
echo "#define FAQ_PARTS $NUM" >>FAQ.include
|
|
|
|
SIZE=`wc -c FAQ | tr -d ' A-Za-z'`
|
|
|
|
echo "#define FAQ_SIZE $SIZE" >>FAQ.include
|
|
|
|
rm -f FAQTMP*
|
2003-01-29 12:58:48 +00:00
|
|
|
|
2002-08-20 00:01:52 +00:00
|
|
|
exit 0
|