]> git.sesse.net Git - kdenlive/blob - reindent.sh
Color Picker: Use select rectangle as cursor for rects with a width of 10 or larger
[kdenlive] / reindent.sh
1 #! /bin/sh
2
3 WRKDIR=$(dirname $0)
4 SRCDIRS="$WRKDIR/src $WRKDIR/plugins $WRKDIR/renderer $WRKDIR/thumbnailer"
5
6 if [ $# -gt 0 ]
7 then
8         FILES=$@
9 else
10         FILES=$(find $SRCDIRS -type f -name \*.cpp -o -name \*.h)
11 fi
12
13 astyle --indent=spaces=4 --brackets=linux \
14        --indent-labels --unpad=paren \
15        --pad=oper --convert-tabs \
16        --indent-preprocessor \
17        ${FILES}
18
19 echo -n "Delete .orig files (y/N) ? "
20 read del
21
22 if [ "x${del}" = "xy" ]
23 then
24    echo "removing .orig files"
25    find $SRCDIRS -iname "*.orig" -exec rm {} ";"
26 else
27    echo "Not deleting .orig files"
28 fi