| Last change
 on this file since 3696 was             2738, checked in by cmv, 20 years ago | 
        
          | 
details... cmv 20/05/05
 | 
        
          | 
              
Property                 svn:executable
 set to                 * | 
        
          | File size:
            1.4 KB | 
      
      
| Line |  | 
|---|
| 1 | #!/bin/csh | 
|---|
| 2 |  | 
|---|
| 3 | #--- Decodage arguments | 
|---|
| 4 | unset A | 
|---|
| 5 | unset U | 
|---|
| 6 | unset NOS | 
|---|
| 7 | unset R | 
|---|
| 8 | if( "$1" == '-h' ) then | 
|---|
| 9 | echo "usage chk_cvs.csh [-a] [-all] [-nos] [-u] [r]" | 
|---|
| 10 | echo "    -nos : pas de cvs status demande" | 
|---|
| 11 | echo "    -a   : cvs status reduit  pour tous les fichiers" | 
|---|
| 12 | echo "    -all : cvs status complet pour tous les fichiers" | 
|---|
| 13 | echo "    -u   : update demande" | 
|---|
| 14 | echo "    -r   : chmod a+r demande" | 
|---|
| 15 | exit -1 | 
|---|
| 16 | else | 
|---|
| 17 | while( $#argv>0 ) | 
|---|
| 18 | if( "$1" == "-a") set A = 1 | 
|---|
| 19 | if( "$1" == "-all") set A = 2 | 
|---|
| 20 | if( "$1" == "-nos") set NOS | 
|---|
| 21 | if( "$1" == "-u") set U | 
|---|
| 22 | if( "$1" == "-r") set R | 
|---|
| 23 | shift | 
|---|
| 24 | end | 
|---|
| 25 | endif | 
|---|
| 26 | if( $?U || $?R ) set NOS | 
|---|
| 27 |  | 
|---|
| 28 | set CURDIR = `pwd` | 
|---|
| 29 | if( $?U ) echo "attention...... UPDATE demande" | 
|---|
| 30 |  | 
|---|
| 31 | #--- Recherche des repertoires sous CVS | 
|---|
| 32 | set fall = (`ls -1`) | 
|---|
| 33 | set dcvs = ( ) | 
|---|
| 34 | foreach f ( $fall ) | 
|---|
| 35 | if( -e $f/CVS ) set dcvs = ( $dcvs $f ) | 
|---|
| 36 | end | 
|---|
| 37 |  | 
|---|
| 38 | #--- Action CVS dans chacun des repertoires concernes | 
|---|
| 39 | foreach d ( $dcvs ) | 
|---|
| 40 | if (-e $CURDIR/$d)  then | 
|---|
| 41 | echo " " ; echo " " | 
|---|
| 42 | echo "******************************************" | 
|---|
| 43 | echo "   --- $d ---" ; echo " " | 
|---|
| 44 | cd $CURDIR/$d | 
|---|
| 45 | if( ! $?NOS ) then | 
|---|
| 46 | if( $?A ) then | 
|---|
| 47 | if( $A == 1 ) then | 
|---|
| 48 | cvs status | grep Status | 
|---|
| 49 | else if( $A == 2 ) then | 
|---|
| 50 | cvs status | 
|---|
| 51 | endif | 
|---|
| 52 | else | 
|---|
| 53 | cvs status | grep Status | grep -v "Up-to-date" | 
|---|
| 54 | endif | 
|---|
| 55 | endif | 
|---|
| 56 | if( $?U ) cvs update | 
|---|
| 57 | if( $?R ) then | 
|---|
| 58 | chmod -R a+r * | 
|---|
| 59 | endif | 
|---|
| 60 | endif | 
|---|
| 61 | end | 
|---|
| 62 |  | 
|---|
| 63 | cd $CURDIR | 
|---|
| 64 |  | 
|---|
| 65 | exit 0 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.