1.1.2
by Rohan Garg
Import upstream version 4.10.95 |
1 |
#!/bin/sh
|
1
by Jonathan Riddell
Import upstream version 4.10.80 |
2 |
#Alexander Neundorf <neundorf@kde.org>
|
3 |
#copyright 2002, GPL
|
|
4 |
||
5 |
#call this script to add all files in and below the current dir to cvs
|
|
6 |
#it adds *.c, *.h, *.C, *.cpp, *.cc automatically
|
|
7 |
#*~, *.o, *.so, *.lo, *.la, .libs/, .deps/, .#* are ignored
|
|
8 |
#it asks for the remaining files
|
|
9 |
||
10 |
||
11 |
#ignore dirs "CVS", ".deps", ".libs"
|
|
12 |
#ignore files *.o, *.so, *.lo, *.la, *~, .#*
|
|
13 |
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$"` |
|
14 |
#echo $FOUND
|
|
15 |
||
16 |
ask_for_adding() { |
|
17 |
echo
|
|
1.1.2
by Rohan Garg
Import upstream version 4.10.95 |
18 |
read answer"?Add file $file to cvs ? (y/n) " rest |
1
by Jonathan Riddell
Import upstream version 4.10.80 |
19 |
#if [ "$answer" != "y" ]; then echo $file; fi
|
20 |
if [ "$answer" == "y" ]; then cvs add $file; fi |
|
21 |
}
|
|
22 |
||
23 |
||
24 |
for file in $FOUND |
|
25 |
do
|
|
26 |
#matches all *.h, *.c, *.cpp, *.C, *.cpp, *.cc (and some others too)
|
|
27 |
echo $file | grep "\.[cCh][cp]\?p\?$" && cvs add $file |
|
28 |
echo $file | grep -v "\.[cCh][cp]\?p\?$" && ask_for_adding |
|
29 |
done
|
|
30 |