... le doAll.bat nouveau !
Florian.
@echo off
set SGBDR=%1
set BOOTFILE=%2
set CLIENT=%3
if "%SGBDR%" == "" goto usage
if "%CLIENT%" == "" goto usage
if "%BOOTFILE%" == "" goto usage
set REALBOOTFILE=..\batch\%BOOTFILE%
if not exist "%REALBOOTFILE%" (
echo %REALBOOTFILE% does not exist
exit /B -1
)
if "%SGBDR%" == "mysql" goto classique
if "%SGBDR%" == "sqlserver" goto noconstraint
if "%SGBDR%" == "oracle" goto noconstraint
:usage
echo Usage: "%0 <mysql|oracle|sqlserver> <batch de boot> <client>"
exit -1
:classique
pushd %SGBDR%
call drop_system.bat SILENTLY
call create_system.bat SILENTLY
call create_table.bat SILENTLY
call create_constraint.bat SILENTLY
popd
call fillDB.bat %CLIENT% %REALBOOTFILE%
set ERRORLEVEL=%level%
goto cleanup
:noconstraint
pushd %SGBDR%
call drop_system.bat SILENTLY
call create_system.bat SILENTLY
call create_table.bat SILENTLY
popd
call fillDB.bat %CLIENT% %REALBOOTFILE%
set level=%errorlevel%
pushd %SGBDR%
call create_constraint.bat SILENTLY
popd
goto cleanup
:cleanup
exit %ERRORLEVEL%