@echo off & setlocal enableextensions

:: webadds.bat for citeswood subfolders. Revised 17/11/2018. M.J. Dallwitz

:: Add filenames for Web distribution. Called by webgens.bat.
:: If a file does not exist, an error message is displayed
:: and ERRORLEVEL is set to 1.
:: If a file exists, its name is appended to addfil_.tmp.

set addfil_=0

if "%1%" equ "" goto e-par
if "%1%" equ "intkey" goto intkey
if "%1%" equ "general" goto general
goto e-par

:: (Files to be include in the 'data' zipfile are set in webaddm.bat.)

:: Files to be included in the Intkey zipfile.
:intkey

call addfil_ ichars
call addfil_ iitems
call addfil_ intkey*.ink
call addfil_ *.inp

goto finish

:: Files to be placed (unzipped) on the Web site.
:general

call addfil_ deltlogo.gif
call addfil_ style.css
call addfil_ *.htm
call addfil_ webstart.ink

goto finish

:e-par
echo Parameter error in call to webadds.bat.
endlocal
exit /b 1

:finish
if %addfil_% neq 0 exit /b 1
exit /b 0
