Improve Astyle scripts to use variables.
Using variables for style and options makes it easier to edit the scripts. Also avoids copy/paste errors when editing scripts.
This commit is contained in:
parent
2fa4378338
commit
7b58455ff5
21
runastyle
21
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue