]> git.sesse.net Git - kdenlive/commitdiff
ability to reindent only a part of files (args of reindent.sh)
authorMarco Gittler <marco@gitma.de>
Mon, 3 Mar 2008 12:51:11 +0000 (12:51 +0000)
committerMarco Gittler <marco@gitma.de>
Mon, 3 Mar 2008 12:51:11 +0000 (12:51 +0000)
svn path=/branches/KDE4/; revision=1990

reindent.sh

index 53fe1ecb162f4c93ed15af9419ac6611e61ebb86..6767a474f42611867f7a38ea3132b174145ca78b 100755 (executable)
@@ -1,12 +1,19 @@
 #! /bin/sh
 
+FILES="`find -type f -wholename './src/*.cpp'` `find -type f -wholename './src/*.h'`"
+
+if [ $# -gt 0 ]
+then
+       FILES=$@
+fi
+
 astyle --indent=spaces=4 --brackets=attach \
        --indent-labels --unpad=paren \
        --pad=oper --convert-tabs \
        --indent-preprocessor \
-       `find -type f -wholename './src/*.cpp'` `find -type f -wholename './src/*.h'`
+       ${FILES}
 
-echo -e "Delete .orig files (y/N) ?"
+echo -n "Delete .orig files (y/N) ? "
 read del
 
 if [ "x${del}" = "xy" ]