Skip to content

Commit

Permalink
update astyle-all.sh
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12481 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 15, 2009
1 parent 3ee7056 commit a2adb22
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions scripts/astyle-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand All @@ -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

0 comments on commit a2adb22

Please sign in to comment.