mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
update astyle-all.sh
git-svn-id: http://svn.osgeo.org/qgis/trunk@12481 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
3ee70567a3
commit
a2adb229cd
@ -8,9 +8,20 @@ export elcr="$(tput el)$(tput cr)"
|
||||
|
||||
find src -type f -print | while read f; do
|
||||
case "$f" in
|
||||
src/core/spatialite/*)
|
||||
continue
|
||||
;;
|
||||
|
||||
|
||||
*.cpp|*.h|*.c|*.h|*.cxx|*.hxx|*.c++|*.h++|*.cc|*.hh|*.C|*.H)
|
||||
cmd=astyle.sh
|
||||
;;
|
||||
|
||||
*.ui|*.qgm|*.txt|*.t2t|*.py|*.sip|resources/context_help/*)
|
||||
cmd="flip -ub"
|
||||
;;
|
||||
|
||||
|
||||
*)
|
||||
continue
|
||||
;;
|
||||
@ -26,23 +37,8 @@ find src -type f -print | while read f; do
|
||||
touch -r "$f" "$f.astyle"
|
||||
fi
|
||||
|
||||
echo -ne "Reformating $f$elcr"
|
||||
astyle.sh "$f"
|
||||
echo -ne "Reformating $f $elcr"
|
||||
$cmd "$f"
|
||||
done
|
||||
|
||||
echo
|
||||
|
||||
# convert CRLF to LF
|
||||
find .. -type f \
|
||||
! -path "*/.svn/*" \
|
||||
! -path "*/win_build/*" \
|
||||
! -name "*.def" \
|
||||
! -name "*.rc" \
|
||||
! -name "*.png" \
|
||||
-exec file {} \; |
|
||||
grep CRLF |
|
||||
cut -d: -f1 |
|
||||
while read f; do
|
||||
echo -ne "Flipping $f$elcr"
|
||||
flip -ub "$f"
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user