abr
Qt/Kde coding style and SVN tree
Posted in Qt | No Comments »Hi all,
today I will post a script based on Qt/Kde coding style using astyle command in a woking svn tree to fix coding style.
This script works like the scrip from the last post but now to work in a SVN tree.
It will check the coding style just in the modified and added files to the svn commit.
–
#!/bin/bash
astyle --indent=spaces=4 --brackets=linux \
--indent-labels --pad=oper --unpad=paren \
--one-line=keep-statements --convert-tabs \
--indent-preprocessor \
$(svn status | awk '(/^M/ || /^A/) &&
(/\.h\>/ || /\.c\>/ || /\.cpp\>/){print $2}')
–
You can get the source code from here.
References:


