Warning, file /sdk/kde-dev-scripts/cvsaddcurrentdir was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #!/bin/sh
0002 #Alexander Neundorf <neundorf@kde.org>
0003 #copyright 2002, GPL
0004 
0005 #call this script to add all files in and below the current dir to cvs
0006 #it adds *.c, *.h, *.C, *.cpp, *.cc automatically
0007 #*~, *.o, *.so, *.lo, *.la, .libs/, .deps/, .#* are ignored
0008 #it asks for the remaining files
0009 
0010 
0011 #ignore dirs "CVS", ".deps", ".libs"
0012 #ignore files *.o, *.so, *.lo, *.la, *~, .#*
0013 FOUND=`find |grep -v "^\.$"| grep -v CVS| grep -v "\.[ls]\?o$"|grep -v "~$"|grep -v "\.libs/"|grep -v "\.deps/" |grep -v "\.depend/"| grep -v "/\.#" |grep -v "\.la$"`
0014 #echo $FOUND
0015 
0016 ask_for_adding() {
0017 echo
0018 read answer"?Add file $file to cvs ? (y/n) " rest
0019 #if [ "$answer" != "y" ]; then echo $file; fi
0020 if [ "$answer" == "y" ]; then cvs add $file; fi
0021 }
0022 
0023 
0024 for file in $FOUND
0025 do
0026 #matches all *.h, *.c, *.cpp, *.C, *.cpp, *.cc (and some others too)
0027    echo $file | grep "\.[cCh][cp]\?p\?$" && cvs add $file
0028    echo $file | grep -v "\.[cCh][cp]\?p\?$" && ask_for_adding
0029 done
0030