]> git.sesse.net Git - kdenlive/blobdiff - reindent.sh
Add image transparency option to settings dialog
[kdenlive] / reindent.sh
index 47140d1d7b4578e08916ee2efa85a13e3cd2116b..5d6708de1ad270b86e05b89dd704912389b42756 100755 (executable)
@@ -1,7 +1,28 @@
 #! /bin/sh
 
-astyle --indent=spaces=4 --brackets=attach \
+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=linux \
        --indent-labels --unpad=paren \
        --pad=oper --convert-tabs \
        --indent-preprocessor \
-       `find -type f -wholename './src/*.cpp'` `find -type f -wholename './src/*.h'`
\ No newline at end of file
+       ${FILES}
+
+echo -n "Delete .orig files (y/N) ? "
+read del
+
+if [ "x${del}" = "xy" ]
+then
+   echo "removing .orig files"
+   find $SRCDIRS -iname "*.orig" -exec rm {} ";"
+else
+   echo "Not deleting .orig files"
+fi