@echo off & setlocal enableextensions & echo.

if "%1" equ "/?" (
   echo runall.bat runs all action sets ^(directives files^) required for
   echo Web distribution of the dataset. If there is a parameter
   echo ^(e.g. 'runall x'^), the revision date is set to the current date.
   exit /b 0
   )

if "%~1" neq "" call dataver || goto abort

call imagenotes_ || goto abort

call confor toint || goto abort
call confor tonatsr || goto abort
call confor printch || goto abort
call confor tonath || goto abort

call findprog copgen > nul || goto skipped
goto copgen

:skipped
echo.
echo    Copying of general files from other Watson ^& Dallwitz datasets
echo    is not available. The files are already in this dataset.
goto finish

:copgen
call copgen || goto abort

:finish
call finish && goto end

:abort
echo.
echo    ****** 'runall.bat' failed.
exit /b 1

:end
exit /b 0
