@ECHO OFF
SETLOCAL

set BASE=%~DP0%
set SCRIPTPATH=%~DP0%~NX0

FOR %%i IN ("%SCRIPTPATH%\..\..\") DO SET HOME=%%~fsi

:loop
IF NOT "%1"=="" (
    IF "%1"=="-binary" (
	    %HOME%/perl/bin/perl %BASE%/auto/database/bin/OPatchAutoBinary.pl %*
	    GOTO :exit
    )
	
    SHIFT
    GOTO :loop
)

:exit
SET RETURNCODE=%ERRORLEVEL%
IF NOT "%RETURNCODE%"=="0" (
  EXIT /B %RETURNCODE%
)

ENDLOCAL


