]> git.sesse.net Git - kdenlive/blob - reindent.sh
Fix issue 0000543: [PATCH] Escaping of hypens in manpages (http://www.kdenlive.org...
[kdenlive] / reindent.sh
1 #! /bin/sh
2
3 FILES="`find -type f -wholename './src/*.cpp'` `find -type f -wholename './src/*.h'` `find -type f -wholename './renderer/*.cpp'` `find -type f -wholename './renderer/*.h'` `find -type f -wholename './plugins/*.cpp'` `find -type f -wholename './plugins/*.h'`"
4
5 if [ $# -gt 0 ]
6 then
7         FILES=$@
8 fi
9
10 astyle --indent=spaces=4 --brackets=attach \
11        --indent-labels --unpad=paren \
12        --pad=oper --convert-tabs \
13        --indent-preprocessor \
14        ${FILES}
15
16 echo -n "Delete .orig files (y/N) ? "
17 read del
18
19 if [ "x${del}" = "xy" ]
20 then
21    echo "removing .orig files"
22    find src -iname "*.orig" -exec rm {} ";"
23 else
24    echo "Not deleting .orig files"
25 fi