@echo off
REM Wrapper cho build-all.ps1 — ưu tiên pwsh (PS7+), fallback powershell (PS5.1)
setlocal
set ROOT=%~dp0..
pushd "%ROOT%"

where pwsh >nul 2>&1
if %ERRORLEVEL% == 0 (
    pwsh -NoProfile -ExecutionPolicy Bypass -File "%~dp0build-all.ps1" %*
) else (
    powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0build-all.ps1" %*
)
set RC=%ERRORLEVEL%

popd
endlocal & exit /b %RC%
