X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=reindent.sh;h=0233d0c38ad9cfcfeb87ef248880f5252068fcaa;hb=554ae2bd27bceeccae97be34a4a6798637ef813b;hp=7de5a150f6e2be5c34758a487f0f7010f2e538f7;hpb=b81944ffedede7cff53b4095758b9fce09a96f84;p=kdenlive diff --git a/reindent.sh b/reindent.sh index 7de5a150..0233d0c3 100755 --- a/reindent.sh +++ b/reindent.sh @@ -1,13 +1,15 @@ #! /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'`" +SRCDIRS="src plugins renderer 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 +21,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