@echo off
+setlocal
-if "%~1"=="-h" goto help
-if "%~1"=="-help" goto help
-if "%~1"=="-?" goto help
-if "%~1"=="/?" goto help
+set _args=%*
+if "%~1"=="-?" set _args=-help
+if "%~1"=="/?" set _args=-help
-powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0eng\build.ps1" %*
-goto end
-
-:help
-powershell -ExecutionPolicy ByPass -NoProfile -Command "& { . '%~dp0eng\build.ps1'; Get-Help }"
-
-:end
+powershell -ExecutionPolicy ByPass -NoProfile -Command "& '%~dp0eng\build.ps1'" %_args%
exit /b %ERRORLEVEL%