Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!natinst.com!hrd769.brooks.af.mil!hrd769.brooks.af.mil!not-for-mail
From: burgess@hrd769.brooks.af.mil (Dave Burgess)
Newsgroups: comp.os.386bsd.misc
Subject: How is the FAQ "produced"?
Date: 1 Jul 1993 14:33:23 -0500
Organization: Armstrong Laboratory, Brooks AFB, TX
Lines: 77
Message-ID: <20ve6h$8o5@hrd769.brooks.af.mil>
NNTP-Posting-Host: hrd769.brooks.af.mil
I have recevied some mail asking what I mean when I say that the FAQ is
"produced" instead of just editted.
The first two sections of the FAQ are actually run through cpp to have
files included so that the information listed is always as up-to-date as
humanly possible. I have included the faq production script below:
#! /bin/sh
#
# @(#) newfaq - Generate a new FAQ.
#
DATESTR=`date "+%d %h %Y"`
#
# FAQ_01 includes a cleaned-up archie -l list, which is included as the
# site list in this section. The date is included here to show when
# the site list was produced. Remember that all changes should be made
# to FAQ_01.cpp, instead of the actual FAQ.
#
if [ FAQ_01.cpp -nt /home/ftp/pub/386bsd.faq/FAQ_01 ] ; then
echo "Creating FAQ_01"
archie -l 386BSD | awk -f archie.clean > recent_site_list
cpp -DUPDATE="$DATESTR" FAQ_01.cpp | grep -v '^# ' > FAQ_01
cp FAQ_01 /home/ftp/pub/386bsd.faq/FAQ_01
touch master.index
fi
#
# The rest of the sections are just copied out of the working directory
# into the FP archive directory. They aren't preprocessed ... yet.
#
for i in 2 3 4 5 6 7 8 9
do
if [ FAQ_0${i} -nt /home/ftp/pub/386bsd.faq/FAQ_0${i} ] ; then
echo "Creating FAQ_0${i}"
cp FAQ_0${i} /home/ftp/pub/386bsd.faq/FAQ_0${i}
touch master.index
fi
done
#
# If any of the sections are new, we may need a new master.index. We
# will just assume so, and produce one, which will produce a new
# FAQ_00.
#
if [ master.index -nt FAQ_00.cpp ] ; then
echo "Creating Master TOC"
for i in 0 1 2 3 4 5 6 7 8 9
do
if [ -f FAQ_0${i}.cpp ] ; then
cat FAQ_0${i}.cpp
else
cat FAQ_0$i
fi
done | awk -f master.index.build | grep -v "^$" > master.index
tr " " " " <master.index >temp
awk -f master.index.format <temp >master.index
rm temp
touch FAQ_00.cpp
fi
#
# The date is included in the header of FAQ_00, to show the date of the
# table of contents, if nothing else. All changes to FAQ_00 need to be
# made to FAQ_00.cpp.
#
if [ FAQ_00.cpp -nt /home/ftp/pub/386bsd.faq/FAQ_00 ] ; then
echo "Creating FAQ_00"
cpp -DUPDATE="$DATESTR" FAQ_00.cpp | grep -v '^# ' > FAQ_00
cp FAQ_00 /home/ftp/pub/386bsd.faq/FAQ_00
fi
If anyone has any questions about the FAQ, feel free to E-Mail me here.
Remember, the FAQ is available for anonymous FTP from
~/pub/FAQ:hrd769.brooks.af.mil until we start posting to *.answers.
--
------
TSgt Dave Burgess
NCOIC AL/Management Information Systems Office
Brooks AFB, TX