diff options
author | Armada <jules.blok@gmail.com> | 2013-01-09 03:17:39 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2013-01-09 15:26:54 +0400 |
commit | ab1a71dfbb4a86de5750def42183ffa64886dde4 (patch) | |
tree | 7636fd12f068e7e3897d72a735cc4d30f765b820 /contrib/run_astyle.bat | |
parent | 4ab84e0854c29f0b145671509fd9c9fe753716d9 (diff) |
Allow files to be dropped onto run_astyle.bat for styling
Diffstat (limited to 'contrib/run_astyle.bat')
-rw-r--r-- | contrib/run_astyle.bat | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/run_astyle.bat b/contrib/run_astyle.bat index 0a0b282c1..029cdb437 100644 --- a/contrib/run_astyle.bat +++ b/contrib/run_astyle.bat @@ -3,7 +3,13 @@ SETLOCAL PUSHD %~dp0 TITLE Running astyle using astyle.ini -astyle --options=astyle.ini ..\*.h ..\*.cpp + +IF "%~1" == "" ( + astyle -r --options=astyle.ini ..\*.h ..\*.cpp +) ELSE ( + FOR %%G IN (%*) DO astyle --options=astyle.ini %%G +) + IF %ERRORLEVEL% NEQ 0 ECHO. & ECHO ERROR: Something went wrong! POPD |