Rev | Line | |
---|
[658] | 1 | #!/bin/csh
|
---|
| 2 |
|
---|
| 3 | unset A
|
---|
| 4 | unset U
|
---|
| 5 | unset NOS
|
---|
| 6 | unset R
|
---|
| 7 | if( "$1" == '-h' ) then
|
---|
| 8 | echo "usage chk_cvs.csh [-a] [-all] [-nos] [-u] [r]"
|
---|
| 9 | echo " -nos : pas de cvs status demande"
|
---|
| 10 | echo " -a : cvs status reduit pour tous les fichiers"
|
---|
| 11 | echo " -all : cvs status complet pour tous les fichiers"
|
---|
| 12 | echo " -u : update demande"
|
---|
| 13 | echo " -r : chmod a+r demande"
|
---|
| 14 | exit -1
|
---|
| 15 | else
|
---|
| 16 | while( $#argv>0 )
|
---|
| 17 | if( "$1" == "-a") set A = 1
|
---|
| 18 | if( "$1" == "-all") set A = 2
|
---|
| 19 | if( "$1" == "-nos") set NOS
|
---|
| 20 | if( "$1" == "-u") set U
|
---|
| 21 | if( "$1" == "-r") set R
|
---|
| 22 | shift
|
---|
| 23 | end
|
---|
| 24 | endif
|
---|
| 25 | if( $?U || $?R ) set NOS
|
---|
| 26 |
|
---|
| 27 | set fall = (`ls -1`)
|
---|
| 28 | set dcvs = ( )
|
---|
| 29 | foreach f ( $fall )
|
---|
| 30 | if( -e $f/CVS ) set dcvs = ( $dcvs $f )
|
---|
| 31 | end
|
---|
| 32 |
|
---|
| 33 | set CURDIR = `pwd`
|
---|
| 34 | if( $?U ) echo "attention...... UPDATE demande"
|
---|
| 35 |
|
---|
| 36 | foreach d ( $dcvs )
|
---|
| 37 | if (-e $CURDIR/$d) then
|
---|
| 38 | echo " " ; echo " "
|
---|
| 39 | echo "******************************************"
|
---|
| 40 | echo " --- $d ---" ; echo " "
|
---|
| 41 | cd $CURDIR/$d
|
---|
| 42 | if( ! $?NOS ) then
|
---|
| 43 | if( $?A ) then
|
---|
| 44 | if( $A == 1 ) then
|
---|
| 45 | cvs status | grep Status
|
---|
| 46 | else if( $A == 2 ) then
|
---|
| 47 | cvs status
|
---|
| 48 | endif
|
---|
| 49 | else
|
---|
| 50 | cvs status | grep Status | grep -v "Up-to-date"
|
---|
| 51 | endif
|
---|
| 52 | endif
|
---|
| 53 | if( $?U ) cvs update
|
---|
| 54 | if( $?R ) then
|
---|
| 55 | chmod -R a+r *
|
---|
| 56 | endif
|
---|
| 57 | endif
|
---|
| 58 | end
|
---|
| 59 |
|
---|
| 60 | cd $CURDIR
|
---|
| 61 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.