mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 09:43:57 -04:00
real reformat.sh
This commit is contained in:
parent
52a1739e7c
commit
5fcd35fd66
10
reformat.sh
10
reformat.sh
@ -1,14 +1,24 @@
|
|||||||
#!/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`
|
||||||
|
Loading…
Reference in New Issue
Block a user