Skip to content

Commit ca3ed55

Browse files
committed
chore: Simplify runastyle.bat by using "@echo OFF"
This change simplifies the Windows batch script by using "@echo OFF" to reduce unnecessary output, making the script cleaner and easier to read.
1 parent 3bba884 commit ca3ed55

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

runastyle.bat

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
@REM Script to run AStyle on the sources
2-
@REM The version check in this script is used to avoid commit battles
3-
@REM between different developers that use different astyle versions as
4-
@REM different versions might have different output (this has happened in
5-
@REM the past).
1+
@ECHO off
2+
REM Script to run AStyle on the sources
3+
REM The version check in this script is used to avoid commit battles
4+
REM between different developers that use different astyle versions as
5+
REM different versions might have different output (this has happened in
6+
REM the past).
67

7-
@REM Get the directory of the script
8+
REM Get the directory of the script
89
SET SCRIPT_DIR=%~dp0
910

10-
@REM Change to that directory
11+
REM Change to that directory
1112
CD /d %SCRIPT_DIR%
1213

13-
@REM To require a newer astyle version, update ASTYLE_VERSION below.
14-
@REM ASTYLE_VERSION_STR is then constructed to match the beginning of the
15-
@REM version string reported by "astyle --version".
16-
@SET ASTYLE_VERSION="3.0.1"
17-
@SET ASTYLE_VERSION_STR="Artistic Style Version %ASTYLE_VERSION%"
18-
@SET ASTYLE="astyle"
14+
REM To require a newer astyle version, update ASTYLE_VERSION below.
15+
REM ASTYLE_VERSION_STR is then constructed to match the beginning of the
16+
REM version string reported by "astyle --version".
17+
SET ASTYLE_VERSION="3.0.1"
18+
SET ASTYLE_VERSION_STR="Artistic Style Version %ASTYLE_VERSION%"
19+
SET ASTYLE="astyle"
1920

20-
@SET DETECTED_VERSION_STR=""
21-
@FOR /F "tokens=*" %%i IN ('%ASTYLE% --version') DO SET DETECTED_VERSION_STR=%%i
22-
@ECHO %DETECTED_VERSION_STR% | FINDSTR /B /C:%ASTYLE_VERSION_STR% > nul && (
21+
SET DETECTED_VERSION_STR=""
22+
FOR /F "tokens=*" %%i IN ('%ASTYLE% --version') DO SET DETECTED_VERSION_STR=%%i
23+
ECHO %DETECTED_VERSION_STR% | FINDSTR /B /C:%ASTYLE_VERSION_STR% > nul && (
2324
ECHO "%DETECTED_VERSION_STR%" matches %ASTYLE_VERSION_STR%
2425
) || (
2526
ECHO You should use: %ASTYLE_VERSION_STR%

0 commit comments

Comments
 (0)