-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcvc.sh
More file actions
executable file
·61 lines (55 loc) · 1.45 KB
/
cvc.sh
File metadata and controls
executable file
·61 lines (55 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
# cvc.sh
#
# 2004-12-15: Created by Julien MOREAU
# 2012-11-23: Partly translated in English by Julien MOREAU
#
# En: This script only looks for local updates in comparison with a CVS repository
# & can show a list of editors (with the -e option).
#
# Fr: Ce script regarde simplement si les fichiers sont à jour
# et éventuellement s'ils sont en cours d'édition (option -e).
#
# Option(s) :
# -b Add a blank line at the begining.
# -e Show file editors (who use the 'cvs edit ...' command)
#
# Last version under CVS (GMT):
# $Header: /cvs/CVS-tools/cvc.sh,v 1.13 2012-11-23 10:08:38 jmoreau Exp $
nbrp=0 # Number of required parameters
# / Check the command line:
err='false' ; opte='false'
while [ "$#" -ge 1 ]
do
case "$1" in
'-b') shift ; echo ;;
'-e') shift ; opte='true' ;;
*) shift ; err='true' ;;
esac
done
if [ "$#" -gt "$nbrp" ] ; then err='true' ; fi
# Display help if needed:
if "$err" ; then
cmd=`basename $0`
echo -e "Usage: $cmd [-b] [-e]" 1>&2
head -n 19 "$0"|tail -n 6
exit 1
fi
# \ End of command line checks.
# Start processing:
# cvs status :
echo "cvs status :"
cvs status 2>&1 \
| grep -ve 'Status: Up-to-date'$ -e '(none)'$ -e ===== \
-e 'New file!'$ -e ^'cvs status: Examining ' \
-e kb$ -e ^" Repository revision: " \
| grep -e ^File -e ^'?' -e '!' \
-ie err -e abort -e ^' Sticky ' \
| nl
# cvs editors :
if "$opte" ; then
echo
echo "cvs editors :"
#cvs editors|cut -f-4|sed "s/\t/ | /g"
cvseditors.sh|nl
fi