ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/yiiyama/Toolset/scripts/checkcvs
Revision: 1.1
Committed: Mon Apr 2 08:23:02 2012 UTC (13 years, 1 month ago) by yiiyama
Branch: MAIN
Log Message:
checkcvs

File Contents

# User Rev Content
1 yiiyama 1.1 #!/bin/bash
2    
3     checkcvs(){
4     local thisdir=$(cd $1; pwd)
5    
6     if [ ! -d $thisdir/CVS ]; then
7     echo "cd $thisdir/..; cvs add $thisdir"
8     return
9     fi
10    
11     list=`ls $thisdir`
12    
13     for entry in $list; do
14     if [ $entry = "CVS" -o $entry = $(basename $0) -o $(expr "$entry" : '[^~]*[~]') -ne 0 ]; then
15     continue
16     fi
17    
18     line=`grep \/$entry\/ $thisdir/CVS/Entries`
19    
20     if [ -z "$line" ]; then
21     echo "cd $thisdir; cvs add $entry"
22     continue
23     fi
24    
25     if [ -d $thisdir/$entry ]; then
26     checkcvs $thisdir/$entry
27     fi
28     done
29    
30     return 0
31     }
32    
33     checkcvs $1