diff --git a/vcbuild.bat b/vcbuild.bat index ec30beca3ae668..fc3b8e28d6ddee 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -4,14 +4,9 @@ :: explicitly allow them to persist in the calling shell. endlocal -if /i "%1"=="help" goto help -if /i "%1"=="--help" goto help -if /i "%1"=="-help" goto help -if /i "%1"=="/help" goto help -if /i "%1"=="?" goto help -if /i "%1"=="-?" goto help -if /i "%1"=="--?" goto help -if /i "%1"=="/?" goto help +set "arg=%1" +if /i "%arg:~-1%"=="?" goto help +if /i "%arg:~-4%"=="help" goto help cd %~dp0