]> git.sesse.net Git - kdenlive/blobdiff - reindent.sh
Fix slot for project proxy params not correctly defined
[kdenlive] / reindent.sh
index 7de5a150f6e2be5c34758a487f0f7010f2e538f7..5d6708de1ad270b86e05b89dd704912389b42756 100755 (executable)
@@ -1,13 +1,16 @@
 #! /bin/sh
 
-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'` `find -type f -wholename './thumbnailer/*.cpp'` `find -type f -wholename './thumbnailer/*.h'`"
+WRKDIR=$(dirname $0)
+SRCDIRS="$WRKDIR/src $WRKDIR/plugins $WRKDIR/renderer $WRKDIR/thumbnailer"
 
 if [ $# -gt 0 ]
 then
        FILES=$@
+else
+       FILES=$(find $SRCDIRS -type f -name \*.cpp -o -name \*.h)
 fi
 
-astyle --indent=spaces=4 --brackets=attach \
+astyle --indent=spaces=4 --brackets=linux \
        --indent-labels --unpad=paren \
        --pad=oper --convert-tabs \
        --indent-preprocessor \
@@ -19,7 +22,7 @@ read del
 if [ "x${del}" = "xy" ]
 then
    echo "removing .orig files"
-   find src -iname "*.orig" -exec rm {} ";"
+   find $SRCDIRS -iname "*.orig" -exec rm {} ";"
 else
    echo "Not deleting .orig files"
 fi