Skip to content
Permalink
Browse files

update astyle-all.sh

git-svn-id: http://svn.osgeo.org/qgis/trunk@12481 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Dec 15, 2009
1 parent 3ee7056 commit a2adb229cd9fbbafd790a8583045eb92c4b06d16
Showing with 13 additions and 17 deletions.
  1. +13 −17 scripts/astyle-all.sh
@@ -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

0 comments on commit a2adb22

Please sign in to comment.
You can’t perform that action at this time.