]> git.sesse.net Git - kdenlive/commitdiff
Optimize the search for source files in the reindent script.
authorRay Lehtiniemi <rayl@mail.com>
Sat, 4 Apr 2009 01:27:43 +0000 (01:27 +0000)
committerRay Lehtiniemi <rayl@mail.com>
Sat, 4 Apr 2009 01:27:43 +0000 (01:27 +0000)
Use only a single find subprocess to search for all file patterns
and subdirectories.

Signed-off-by: Ray Lehtiniemi <rayl@mail.com>
svn path=/trunk/kdenlive/; revision=3204

reindent.sh

index 7de5a150f6e2be5c34758a487f0f7010f2e538f7..0061a716eeff876e743ea42ac5619d4117d9341b 100755 (executable)
@@ -1,10 +1,12 @@
 #! /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 \