Skip to content
Snippets Groups Projects
Commit 5fcd35fd authored by Pat Hickey's avatar Pat Hickey
Browse files

real reformat.sh

parent 52a1739e
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
DIR=$1 DIR=$1
COMMIT=$2
function do_commit {
if [ $COMMIT == 1 ] ;then
git commit $1 --author="uncrustify <pat@moreproductive.org>" \
--message="uncrustify";
fi
}
function format_cpp { function format_cpp {
echo 'format_cpp' $1 echo 'format_cpp' $1
uncrustify --no-backup -c uncrustify_cpp.cfg $1 uncrustify --no-backup -c uncrustify_cpp.cfg $1
do_commit $1
} }
function format_header { function format_header {
echo 'format_header' $1 echo 'format_header' $1
uncrustify --no-backup -c uncrustify_headers.cfg $1 uncrustify --no-backup -c uncrustify_headers.cfg $1
do_commit $1
} }
PDEFILES=`find $DIR -name '*.pde' -print` PDEFILES=`find $DIR -name '*.pde' -print`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment