@echo off
rem first call to hcompile is to virus check it
hcompile
if errorlevel 2 goto exit

rem the 1 and 2 parameters are to show which pass is going
echo This file contains any errors that occured while making the index > messages.txt
echo files for HyprHelp. PgDn to view it all >> messages.txt
@echo. >> messages.txt
echo PASS 1 >> messages.txt

rem :  use the 3 lines below if your DOS supports the call command
@echo on
for %%a in (*.hyp) do call crosindx %%a 1
@echo off

rem :  use the 3 lines below if your DOS doesn't support the call command
rem : @echo on
rem : for %%a in (*.hyp) do command /c crosindx %%a 1
rem : @echo off

echo .pg >> messages.txt
echo PASS 2 >> messages.txt

rem :  use the 3 lines below if your DOS supports the call command
@echo on
for %%a in (*.hyp) do call crosindx %%a 2
@echo off

rem :  use the 3 lines below if your DOS doesn't support the call command
rem : @echo on
rem : for %%a in (*.hyp) do command /c crosindx %%a 2
rem : @echo off

rem these arn't needed but can be left if you want for manual linkages
rem deleting the next line to leave the .ent files can be useful while you
rem are building up a help system
del *.ent

:exit
@echo.
echo After you start HyprHelp look at "messages" to see the results of
echo creating the index files.
@echo.
echo on