|
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). |
6 | 7 |
|
7 | | -@REM Get the directory of the script |
| 8 | +REM Get the directory of the script |
8 | 9 | SET SCRIPT_DIR=%~dp0 |
9 | 10 |
|
10 | | -@REM Change to that directory |
| 11 | +REM Change to that directory |
11 | 12 | CD /d %SCRIPT_DIR% |
12 | 13 |
|
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" |
19 | 20 |
|
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 && ( |
23 | 24 | ECHO "%DETECTED_VERSION_STR%" matches %ASTYLE_VERSION_STR% |
24 | 25 | ) || ( |
25 | 26 | ECHO You should use: %ASTYLE_VERSION_STR% |
|
0 commit comments