From 27d2cc5df7a3237d2abdbf7372267262ab3c4add Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Mon, 20 May 2024 14:32:07 +0200 Subject: [PATCH] Refs #21037. Use `%*` instead of loop in `.bat` scripts. Signed-off-by: Miguel Company --- tools/fastdds/fastdds.bat | 13 ++----------- tools/fastdds/ros-discovery.bat | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/tools/fastdds/fastdds.bat b/tools/fastdds/fastdds.bat index de259c851d..c23d8527cc 100644 --- a/tools/fastdds/fastdds.bat +++ b/tools/fastdds/fastdds.bat @@ -2,15 +2,6 @@ setlocal set dir=%~dp0 -set args=%1 - -:getarg -shift -if "%~1"=="" goto continue -set args=%args% %1 -goto getarg - -:continue :: Check python py --list > NUL 2>&1 @@ -25,10 +16,10 @@ if not %ERRORLEVEL%==0 ( if not "%PYTHON_VERSION%" == "" ( :: Use launcher to profit from shebang hints on fastdds.py :: Select the correct python version to source the appropriate paths - py -%PYTHON_VERSION% "%dir%\..\tools\fastdds\fastdds.py" %args% + py -%PYTHON_VERSION% "%dir%\..\tools\fastdds\fastdds.py" %* ) else ( :: Use launcher to profit from shebang hints on fastdds.py :: Select latest available python version - py "%dir%\..\tools\fastdds\fastdds.py" %args% + py "%dir%\..\tools\fastdds\fastdds.py" %* ) diff --git a/tools/fastdds/ros-discovery.bat b/tools/fastdds/ros-discovery.bat index 66380408ac..141ab6ac5b 100644 --- a/tools/fastdds/ros-discovery.bat +++ b/tools/fastdds/ros-discovery.bat @@ -2,15 +2,6 @@ setlocal set dir=%~dp0 -set args=%1 - -:getarg -shift -if "%~1"=="" goto continue -set args=%args% %1 -goto getarg - -:continue :: Check python py --list > NUL 2>&1 @@ -25,10 +16,10 @@ if not %ERRORLEVEL%==0 ( if not "%PYTHON_VERSION%" == "" ( :: Use launcher to profit from shebang hints on fastdds.py :: Select the correct python version to source the appropriate paths - py -%PYTHON_VERSION% "%dir%\..\tools\fastdds\fastdds.py" discovery %args% + py -%PYTHON_VERSION% "%dir%\..\tools\fastdds\fastdds.py" discovery %* ) else ( :: Use launcher to profit from shebang hints on fastdds.py :: Select latest available python version - py "%dir%\..\tools\fastdds\fastdds.py" discovery %args% + py "%dir%\..\tools\fastdds\fastdds.py" discovery %* )