diff --git a/runastyle b/runastyle index f2e8cc3c4..eb1920442 100755 --- a/runastyle +++ b/runastyle @@ -1,13 +1,16 @@ #!/bin/bash -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren cli/*.cpp -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren cli/*.h -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren gui/*.cpp -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren gui/*.h -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren lib/*.cpp -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren lib/*.h -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren test/*.cpp -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren test/*.h +style="--style=ansi --min-conditional-indent=0" +options="--pad-header --unpad-paren" -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren tools/*.cpp +astyle $style $options cli/*.cpp +astyle $style $options cli/*.h +astyle $style $options gui/*.cpp +astyle $style $options gui/*.h +astyle $style $options lib/*.cpp +astyle $style $options lib/*.h +astyle $style $options test/*.cpp +astyle $style $options test/*.h + +astyle $style $options tools/*.cpp diff --git a/runastyle.bat b/runastyle.bat index 4cc0d62d3..0394eab51 100644 --- a/runastyle.bat +++ b/runastyle.bat @@ -1,12 +1,16 @@ +REM A script to run Astyle for the sources -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren cli/*.cpp -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren cli/*.h -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren gui/*.cpp -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren gui/*.h -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren lib/*.cpp -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren lib/*.h -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren test/*.cpp -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren test/*.h +SET STYLE=--style=ansi --min-conditional-indent=0 +SET OPTIONS=--pad-header --unpad-paren -astyle --style=ansi --min-conditional-indent=0 --pad-header --unpad-paren tools/*.cpp +astyle %STYLE% %OPTIONS% cli/*.cpp +astyle %STYLE% %OPTIONS% cli/*.h +astyle %STYLE% %OPTIONS% gui/*.cpp +astyle %STYLE% %OPTIONS% gui/*.h +astyle %STYLE% %OPTIONS% lib/*.cpp +astyle %STYLE% %OPTIONS% lib/*.h +astyle %STYLE% %OPTIONS% test/*.cpp +astyle %STYLE% %OPTIONS% test/*.h + +astyle %STYLE% %OPTIONS% tools/*.cpp