source: Sophya/trunk/SophyaLib/Mgr/chk_cvs.csh@ 2738

Last change on this file since 2738 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
4unset A
5unset U
6unset NOS
7unset R
8if( "$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
16else
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
25endif
26if( $?U || $?R ) set NOS
27
28set CURDIR = `pwd`
29if( $?U ) echo "attention...... UPDATE demande"
30
31#--- Recherche des repertoires sous CVS
32set fall = (`ls -1`)
33set dcvs = ( )
34foreach f ( $fall )
35 if( -e $f/CVS ) set dcvs = ( $dcvs $f )
36end
37
38#--- Action CVS dans chacun des repertoires concernes
39foreach 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
61end
62
63cd $CURDIR
64
65exit 0
Note: See TracBrowser for help on using the repository browser.