3 # $Id: make-faq,v 1.4 2003/03/02 17:42:28 jmayer Exp $
5 # Make-faq - Creates a plain text version of the Ethereal FAQ
6 # from http://www.ethereal.com/faq
8 # Split the FAQ every LINECOUNT lines so the strings don't become too long
9 # for # some compilers.
17 Note: This is just an ASCII snapshot of the faq and may not be up to
18 date. Please go to http://www.ethereal.com/faq for the up to
19 date version. The version of this snapshot can be found at the
26 lynx -dump -nolist "http://www.ethereal.com/faq" | sed -e '1,/INDEX/d' >>FAQ
28 # Create an #include'able version for gtk/help_dlg.c
29 rm -f FAQ.include FAQTMP*
30 split -l $LINECOUNT FAQ FAQTMP
32 echo "const char *faq_part[] = {" >>FAQ.include
34 if [ $NUM -ne 0 ]; then
35 echo "," >>FAQ.include
38 sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$/\\n"/' <$i >>FAQ.include
41 echo "};" >>FAQ.include
42 echo "#define FAQ_PARTS $NUM" >>FAQ.include
43 SIZE=`wc -c FAQ | tr -d ' A-Za-z'`
44 echo "#define FAQ_SIZE $SIZE" >>FAQ.include