@echo off
REM Use "COOKHTML" to generate the ChAOS web sites files in subdirectory USER
REM and "COOKHTML MAKECLEAN" to get rid of sub-directory USER.
REM 20010603 MSD009 Brought TELLTALE into the fold.
REM 20010306 MSD008 Brought CDU into the fold.
REM 20010228 MSD007 Added calls to autogen (and autodel) PROBE2 and CFG2 files.
REM 20010227 MSD006 Add call to CCU. (Changes the case of file names.)
REM 20010226 MSD005 Adopt new names for the P2 "read me" and tutorial.
REM 20010224 MSD004 Added references to the new CFG2 documentation.
REM 20010214 MSD003 Altered to take account of file name change.
REM 20010125 MSD002 Add copying of VERSION.INI *before* CFG2 is run.
REM 20010123 MSD001 Add references to the forthcoming "CDU" program.
echo Y > yes
md User
cd User
del *.* < ..\yes
:PROBE2GEN
if exist c:\work\c\tc\probe2\p2.htm goto :CFG2GEN
pushdir
cd c:\work\c\tc\probe2
call cookhtml
popdir
:CFG2GEN
if exist c:\work\c\tc\cfg2\cfg2.htm goto :TTGEN
pushdir
cd c:\work\c\tc\cfg2
call cookhtml
popdir
:TTGEN
if exist c:\work\c\msvc\telltale\tt.htm goto :CDUGEN
pushdir
cd c:\work\c\msvc\telltale
call cookhtml
popdir
:CDUGEN
if exist c:\work\c\tc\cdu\cdu.htm goto :CHAOSGEN
pushdir
cd c:\work\c\tc\cdu
call cookhtml
popdir
:CHAOSGEN
cfg2 -f..\chaos %1 %2 %3 %4 %5 %6 %7 %8 %9
if errorlevel 1 goto GENBAD
copy ..\chaos.ini chaosini.txt
copy ..\cookHTML.bat cookbat.txt
copy ..\*.jpg
copy ..\*.zip
copy c:\work\c\tc\abi2\abi2.htm
copy c:\work\c\tc\probe2\p2.ini p2ini.txt
copy c:\work\c\tc\probe2\p2html.ini p2htmini.txt
copy c:\work\c\tc\probe2\p2faq.htm
copy c:\work\c\tc\probe2\p2.htm
copy c:\work\c\tc\probe2\p2tut.htm
copy c:\work\c\tc\probe2\p2ver.htm
copy c:\work\c\tc\probe2\sys.fth sysfth.txt
copy c:\work\c\tc\probe2\p2tutor.fth p2tutfth.txt
copy c:\work\c\tc\probe2\gps.fth gpsfth.txt
copy c:\work\c\tc\cfg2\cfg2html.ini c2htmini.txt
copy c:\work\c\tc\cfg2\cfg2.htm
copy c:\work\c\tc\cfg2\cfg2faq.htm
copy c:\work\c\tc\cfg2\cfg2ver.htm
copy c:\work\c\tc\cfg2\cfg2ref.htm
copy c:\work\c\tc\cfg2\cfg2tut.htm
cfg2 -h > cfg2.txt
copy c:\work\c\tc\cdu\cduhtml.ini cdhtmini.txt
copy c:\work\c\tc\cdu\cdu.htm
copy c:\work\c\tc\cdu\cdufaq.htm
copy c:\work\c\tc\cdu\cduver.htm
copy c:\work\c\tc\cdu\cduref.htm
copy c:\work\c\tc\cdu\cdutut.htm
copy c:\work\c\tc\cdu\flopsuck.cdu fsuckcdu.txt
copy c:\work\c\tc\cdu\flopspit.cdu fspitcdu.txt
copy c:\work\c\tc\cdu\flopchek.cdu fchekcdu.txt
cdu help > cdu.txt
copy c:\work\c\msvc\telltale\tthtml.ini tthtmini.txt
copy c:\work\c\msvc\telltale\tt.htm
copy c:\work\c\msvc\telltale\ttfaq.htm
copy c:\work\c\msvc\telltale\ttver.htm
copy c:\work\c\msvc\telltale\ttref.htm
copy c:\work\c\msvc\telltale\tttut.htm
ccu -l *
attrib -r -a -s -h *.*
if not "%1"=="" goto GOCLEAN
build ..\version.ini
goto GOPARENT
:GOCLEAN
echo Cleaning site files
del *.* < ..\yes
cd ..
rmdir User
pushdir
cd c:\work\c\tc\probe2
call cookhtml makeclean
cd c:\work\c\tc\cfg2
call cookhtml makeclean
cd c:\work\c\tc\cdu
call cookhtml makeclean
cd c:\work\c\msvc\telltale
call cookhtml makeclean
popdir
goto FINISH
:GENBAD
pause
:GOPARENT
cd ..
:FINISH
del yes