home *** CD-ROM | disk | FTP | other *** search
- Subject: v06i041: CVS, an RCS fonrt-end (cvs), Part2/2
- Newsgroups: mod.sources
- Approved: rs@mirror.UUCP
-
- Submitted by: Dick Grune <seismo!mcvax!vu44!dick>
- Mod.sources: Volume 6, Issue 41
- Archive-name: cvs/Part2
-
- : This is a shar archive. Extract with sh, not csh.
- : This archive ends with exit, so do not worry about trailing junk.
- : --------------------------- cut here --------------------------
- PATH=/bin:/usr/bin
- echo Extracting \B\E\.\a\u\x
- sed 's/^X//' > \B\E\.\a\u\x << '+ END-OF-FILE '\B\E\.\a\u\x
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: BE.aux,v 1.9 86/06/22 18:08:57 dick Exp $
- X
- X#
- X# B u i l d E n t r y
- X# Script, to be included.
- X#
- X# Assumes set:
- X# $CVSLIB
- X# $Name
- X# $Options
- X# $Rcs
- X# $Repository
- X# $User
- X#
- X# Builds an entry for a new file and sets up $User,[pt] by
- X# interrogating the user.
- X#
- X# Sets OK to no and calls continue, if necessary.
- X#
- X
- X# there may be an old file with the same name in the attic!
- X# this is an awkward place to test, but other places are equally awkward
- Xif # it is in the attic already
- X [ -r $Repository/Attic/$User,v ]
- Xthen
- X echo $Name: there is an old file $User already \
- X in $Repository/Attic >&2
- X OK=no
- X continue
- Xfi
- X
- X# isn't the name too long?
- Xif # both $User and $User,x can be linked made by linking
- X ln $User $User, >/dev/null 2>/dev/null \
- X&&
- X ln $User $User,x >/dev/null 2>/dev/null
- Xthen
- X rm $User, $User,x
- Xelse
- X rm -f $User,
- X echo $Name: filename $User is too long >&2
- X OK=no
- X continue
- Xfi
- X
- X# store the options
- Xecho "$Options" >$User,p
- X
- X# get a description file by imitating a call of rcs -i
- Xecho "RCS file: $Rcs"
- Xecho "enter description, terminated with ^D or '.':"
- Xecho "NOTE: This is NOT the log message!"
- Xcp /dev/null $User,t
- Xwhile # the user still provides text
- X echo -n ">> "
- X read TXT
- Xdo # add it to $User,t, except if it is a single dot
- X if # it is the terminating dot
- X [ "$TXT" = "." ]
- X then
- X break
- X fi
- X echo "$TXT" >>$User,t
- Xdone
- Xecho done
- X
- X# create the entry (at the end, since the user may have interrupted)
- X$CVSLIB/RG.aux $User 0 "Initial $User"
- + END-OF-FILE BE.aux
- chmod 'u=rwx,g=rx,o=rx' \B\E\.\a\u\x
- set `sum \B\E\.\a\u\x`
- sum=$1
- case $sum in
- 16090) :;;
- *) echo 'Bad sum in '\B\E\.\a\u\x >&2
- esac
- echo Extracting \C\A\.\a\u\x
- sed 's/^X//' > \C\A\.\a\u\x << '+ END-OF-FILE '\C\A\.\a\u\x
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: CA.aux,v 1.4 86/06/22 18:09:14 dick Exp $
- X
- X#
- X# C r e a t e A d m i n i s t r a t i o n
- X# Script, to be included.
- X#
- X# Assumes set:
- X# $InitRecord
- X# $Name
- X# $Repository
- X#
- X# Creates a CVS administration directory based on repository
- X# $Repository; the Entries file is prefilled from $InitRecord.
- X#
- X
- X# check the repository
- Xif # there is such a repository
- X [ -d $Repository ]
- Xthen :
- Xelse
- X echo $Name: there is no repository $Repository >&2
- X exit 1
- Xfi
- X
- X# check the initial record
- Xif # there is such a file
- X [ -f $InitRecord ]
- Xthen :
- Xelse
- X echo $Name: there is no file $InitRecord >&2
- X exit 1
- Xfi
- X
- X# install CVS.adm directory
- Xif # there is already a directory CVS.adm
- X [ -d CVS.adm ]
- Xthen
- X echo $Name: there is a version here already >&2
- X exit 1
- Xfi
- X
- Xif # we can create the administration directory
- X mkdir CVS.adm
- Xthen :
- Xelse
- X echo $Name: cannot make administration directory ./CVS.adm >&2
- X exit 1
- Xfi
- X
- X# set up the administration
- Xecho $Repository >CVS.adm/Repository
- Xcat $InitRecord >CVS.adm/Entries # use > to make Entries writeable
- + END-OF-FILE CA.aux
- chmod 'u=rw,g=r,o=r' \C\A\.\a\u\x
- set `sum \C\A\.\a\u\x`
- sum=$1
- case $sum in
- 18085) :;;
- *) echo 'Bad sum in '\C\A\.\a\u\x >&2
- esac
- echo Extracting \C\I\.\a\u\x
- sed 's/^X//' > \C\I\.\a\u\x << '+ END-OF-FILE '\C\I\.\a\u\x
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: CI.aux,v 1.6 86/06/22 18:09:32 dick Exp $
- X
- X#
- X# C h e c k I n
- X# Script, to be included
- X#
- X# Assumes set:
- X# $ACT
- X# $CVSLIB
- X# $Message
- X# $Name
- X# $RCSBIN
- X# $Repository
- X# $Revision (to be set to -rN if needed; empty otherwise)
- X# $User
- X#
- X# Does a very careful check-in of the file $User, and tries not
- X# to spoil its modification time (to avoid useless recompilations)
- X#
- X# Sets OK to no, if necessary.
- X#
- X
- Xecho Checking in $User\; log: "$Message"
- XRcs=$Repository/$User,v
- X
- X# offer copy to RCS, in an attempt not to spoil the modification time of $User
- XTmp=,,$User
- X$ACT mv $User $Tmp
- X$ACT cp $Tmp $User
- X
- Xif # check in $Rcs
- X $ACT $RCSBIN/ci $Revision -m"$Message" $Rcs 2>&1
- Xthen # the file $User will now be gone; get a new copy,
- X # with a possibly updated $Header
- X $ACT $RCSBIN/co -q $Rcs
- X $ACT chmod +w $User
- X # but maybe the old $User may still serve
- X if # there were no funny modifications
- X $ACT cmp -s $User $Tmp
- X then # $User is preferable, because of 'make'
- X $ACT mv $Tmp $User
- X else # $Tmp is not of use any more
- X $ACT rm $Tmp
- X fi
- X # get new version number and time stamp
- X . $CVSLIB/VT.aux # sets $VN_User, $VN_Rcs, $TS_User, $TS_Rcs
- X # and register $User
- X $ACT $CVSLIB/RG.aux $User $VN_Rcs "$TS_User"
- Xelse # something is very wrong
- X # restore the old $User
- X $ACT mv $Tmp $User
- X echo $Name: could not check in $User >&2
- X OK=no
- X if # unlock $Rcs
- X $ACT $RCSBIN/rcs -u $Rcs
- X then :
- X else
- X echo $Name: could not UNlock $Rcs >&2
- X fi
- Xfi
- + END-OF-FILE CI.aux
- chmod 'u=rw,g=r,o=r' \C\I\.\a\u\x
- set `sum \C\I\.\a\u\x`
- sum=$1
- case $sum in
- 11171) :;;
- *) echo 'Bad sum in '\C\I\.\a\u\x >&2
- esac
- echo Extracting \C\S\.\a\u\x
- sed 's/^X//' > \C\S\.\a\u\x << '+ END-OF-FILE '\C\S\.\a\u\x
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: CS.aux,v 1.16 86/06/22 18:10:11 dick Exp $
- X
- X#
- X# C o l l e c t S e t s
- X# Script, to be included.
- X#
- X# Assumes set:
- X# $@
- X# $CVSLIB
- X# $Name
- X# $User
- X# $VN_Rcs
- X# $VN_User
- X# $TS_Rcs
- X# $TS_User
- X#
- X# Collects the interesting file names from the administration and
- X# the repository in a number of shell variables:
- X# solved by:
- X# CLIST conflict-ridden (user)
- X# GLIST modified, needs merging (--/UV)
- X# MLIST modified, needs checking in (CM/--)
- X# OLIST needs checking out (--/UV)
- X# ALIST to be added (CM/--)
- X# RLIST to be removed (CM/--)
- X# WLIST remove entry (--/UV)
- X#
- X# It sets OK to no if something is wrong.
- X#
- X
- Xfor User in $@
- Xdo
- X Rcs=$Repository/$User,v
- X . $CVSLIB/VT.aux # sets $VN_User, $VN_Rcs, $TS_User, $TS_Rcs
- X
- X # what entry is this?
- X case $VN_User in
- X "")
- X # no entry available, $TS_Rcs is invalid
- X
- X # how is the RCS file?
- X case $VN_Rcs in
- X "")
- X # there is no RCS file either
- X
- X # how is the user file?
- X case "$TS_User" in
- X "")
- X # there is no user file
- X echo $Name: nothing known about $User >&2
- X OK=no
- X ;;
- X *)
- X # there is a user file
- X echo $Name: use AE to create entry \
- X for $User >&2
- X OK=no
- X ;;
- X esac
- X ;;
- X *)
- X # there is an RCS file
- X
- X # how is the user file?
- X case "$TS_User" in
- X "")
- X # there is no user file
- X OLIST="$OLIST $User"
- X ;;
- X *)
- X # there is a user file
- X echo $Name: move away $User\; \
- X it is in the way >&2
- X CLIST="$CLIST $User"
- X OK=no
- X ;;
- X esac
- X ;;
- X esac
- X ;;
- X
- X 0)
- X # an entry for a new-born file, $TS_Rcs is dummy
- X
- X # how is the user file?
- X case "$TS_User" in
- X "")
- X # there is no user file, but there should be one
- X
- X echo $Name: warning: \
- X new-born $User has disappeared >&2
- X WLIST="$WLIST $User"
- X ;;
- X *)
- X # there is a user file
- X
- X # how is the RCS file?
- X case $VN_Rcs in
- X "")
- X # there is no RCS file
- X
- X ALIST="$ALIST $User"
- X ;;
- X *)
- X # there is an RCS file
- X
- X echo $Name: conflict: $User created \
- X independently by second party >&2
- X CLIST="$CLIST $User"
- X OK=no
- X ;;
- X esac
- X ;;
- X esac
- X ;;
- X
- X -*)
- X # an entry for a removed file, $TS_Rcs is valid
- X
- X # how is the user file?
- X case "$TS_User" in
- X "")
- X # there is no user file (as it should be)
- X
- X # how is the RCS file?
- X case -$VN_Rcs in
- X -)
- X # there is no RCS file
- X
- X # this is all-right, however; it has been
- X # removed independently by second party
- X WLIST="$WLIST $User"
- X ;;
- X $VN_User)
- X # the RCS file is the same version as
- X # the user file
- X
- X # and that's OK
- X RLIST="$RLIST $User"
- X ;;
- X *)
- X # the RCS file is a newer version than
- X # the user file
- X
- X # and this is definitely not OK
- X echo $Name: conflict: removed $User was \
- X modified by second party >&2
- X CLIST="$CLIST $User"
- X OK=no
- X ;;
- X esac
- X ;;
- X *)
- X # user file shouldn't be there
- X echo $Name: $User should be removed \
- X and is still there >&2
- X OK=no
- X ;;
- X esac
- X ;;
- X
- X *)
- X # a normal entry, $TS_Rcs is valid
- X
- X # how is the RCS file?
- X case $VN_Rcs in
- X "")
- X # there is no RCS file
- X
- X # how is the user file?
- X case "$TS_User" in
- X "")
- X # there is no user file
- X echo $Name: warning: $User is not \
- X \(no longer\) pertinent >&2
- X WLIST="$WLIST $User"
- X ;;
- X "$TS_Rcs")
- X # the user file is still unmodified
- X echo $Name: $User is no longer \
- X in the repository >&2
- X WLIST="$WLIST $User"
- X ;;
- X *)
- X # the user file has been modified
- X echo $Name: conflict: $User is modified but \
- X no longer in the repository >&2
- X CLIST="$CLIST $User"
- X OK=no
- X ;;
- X esac
- X ;;
- X $VN_User)
- X # the RCS file is the same version as the user file
- X
- X # how is the user file?
- X case "$TS_User" in
- X "")
- X # there is no user file
- X echo $Name: warning: $User was lost >&2
- X OLIST="$OLIST $User"
- X ;;
- X "$TS_Rcs")
- X # the user file is still unmodified
- X # nothing special at all!
- X ;;
- X *)
- X # the user file has been modified
- X # but do we believe it? This is complicated:
- X . $CVSLIB/ND.aux # sets MLIST, if necessary
- X ;;
- X esac
- X ;;
- X *)
- X # the RCS file is a newer version than the user file
- X
- X # how is the user file?
- X case "$TS_User" in
- X "")
- X # there is no user file
- X echo $Name: warning: $User was lost >&2
- X OLIST="$OLIST $User"
- X ;;
- X "$TS_Rcs")
- X # the user file is still unmodified
- X OLIST="$OLIST $User"
- X ;;
- X *)
- X # the user file has been modified
- X GLIST="$GLIST $User"
- X ;;
- X esac
- X ;;
- X esac
- X ;;
- X esac
- Xdone
- + END-OF-FILE CS.aux
- chmod 'u=rwx,g=rx,o=rx' \C\S\.\a\u\x
- set `sum \C\S\.\a\u\x`
- sum=$1
- case $sum in
- 57537) :;;
- *) echo 'Bad sum in '\C\S\.\a\u\x >&2
- esac
- echo Extracting \E\F\.\a\u\x
- sed 's/^X//' > \E\F\.\a\u\x << '+ END-OF-FILE '\E\F\.\a\u\x
- X#!/bin/sh
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: EF.aux,v 1.1 86/06/15 18:01:03 dick Exp $
- X
- X#
- X# E n t r i e s f i l e t o F i l e s f i l e
- X# Creates a file CVS.adm/Files containing the names that comprise
- X# the project, from CVS.adm/Entries.
- X#
- X
- X<CVS.adm/Entries sed '
- X /^-/d
- X s/.* \(.*\)|/\1/
- X' |
- Xsort >CVS.adm/Files
- + END-OF-FILE EF.aux
- chmod 'u=rwx,g=rx,o=rx' \E\F\.\a\u\x
- set `sum \E\F\.\a\u\x`
- sum=$1
- case $sum in
- 15654) :;;
- *) echo 'Bad sum in '\E\F\.\a\u\x >&2
- esac
- echo Extracting \F\N\.\a\u\x
- sed 's/^X//' > \F\N\.\a\u\x << '+ END-OF-FILE '\F\N\.\a\u\x
- X#!/bin/sh
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: FN.aux,v 1.17 86/06/13 17:59:18 dick Exp $
- X
- X#
- X# F i n d N a m e s
- X# Writes all the pertinent file names, both from the administration
- X# and from the repository $1 to standard output, sorted.
- X#
- X
- X(
- X (cd $1; ls *,v) | grep -v '\*' | sed 's/,v$//'
- X (<CVS.adm/Entries sed 's/.* \(.*\)|/\1/')
- X) |
- Xsort -u
- + END-OF-FILE FN.aux
- chmod 'u=rwx,g=rx,o=rx' \F\N\.\a\u\x
- set `sum \F\N\.\a\u\x`
- sum=$1
- case $sum in
- 38797) :;;
- *) echo 'Bad sum in '\F\N\.\a\u\x >&2
- esac
- echo Extracting \L\R\.\a\u\x
- sed 's/^X//' > \L\R\.\a\u\x << '+ END-OF-FILE '\L\R\.\a\u\x
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: LR.aux,v 1.6 86/06/22 18:11:55 dick Exp $
- X
- X#
- X# L o c a t e R C S F i l e
- X# Script, to be included.
- X#
- X# Assumes set:
- X# $Repository
- X# $User
- X#
- X# Called when the RCS file sought may be in the attic $Repository/Attic.
- X# Sets $Rcs to $Repository/Attic/$User,v if appropriate and to
- X# $Repository/$User,v otherwise.
- X#
- X
- XRcs=$Repository/$User,v
- XOld=$Repository/Attic/$User,v
- Xif # it is in the repository
- X [ -r $Rcs ]
- Xthen :
- Xelif # it is in the attic
- X [ -r $Old ]
- Xthen
- X Rcs=$Old
- Xelse # it is treated as if it were in the repository
- X :
- Xfi
- + END-OF-FILE LR.aux
- chmod 'u=rw,g=r,o=r' \L\R\.\a\u\x
- set `sum \L\R\.\a\u\x`
- sum=$1
- case $sum in
- 55946) :;;
- *) echo 'Bad sum in '\L\R\.\a\u\x >&2
- esac
- echo Extracting \N\D\.\a\u\x
- sed 's/^X//' > \N\D\.\a\u\x << '+ END-OF-FILE '\N\D\.\a\u\x
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: ND.aux,v 1.13 86/06/22 18:12:57 dick Exp $
- X
- X#
- X# N o D i f f e r e n c e
- X# Script, to be included.
- X#
- X# Assumes set:
- X# $ACT
- X# $CVSLIB
- X# $Name
- X# $RCSBIN
- X# $Rcs
- X# $TS_User
- X# $User
- X# $VN_Rcs
- X# $VN_User
- X#
- X# The user file looks modified judging from its time stamp; however
- X# it needn't be. ND.aux finds out whether it is or not.
- X# If it is, it adds its name to the $MLIST.
- X# If it is not, it updates the administration.
- X# It may set OK to 'no'.
- X#
- X
- XTmp=,,$User
- Xif # we can retrieve a provisional copy of $Rcs
- X $RCSBIN/co -p -q -r$VN_User $Rcs >$Tmp
- Xthen # test for differences
- X if # they are equal
- X cmp -s $User $Tmp
- X then # there were no real user differences:
- X # update reference time stamp
- X TS_Rcs="$TS_User"
- X $ACT $CVSLIB/RG.aux $User $VN_Rcs "$TS_User"
- X else # its name belongs in the MLIST
- X MLIST="$MLIST $User"
- X fi
- X
- X rm -f $Tmp
- X
- Xelse # something very wrong
- X echo $Name: could not check out revision $VN_User of $User >&2
- X rm $Tmp
- X OK=no
- Xfi
- X
- + END-OF-FILE ND.aux
- chmod 'u=rwx,g=rx,o=rx' \N\D\.\a\u\x
- set `sum \N\D\.\a\u\x`
- sum=$1
- case $sum in
- 42347) :;;
- *) echo 'Bad sum in '\N\D\.\a\u\x >&2
- esac
- echo Extracting \N\R\.\a\u\x
- sed 's/^X//' > \N\R\.\a\u\x << '+ END-OF-FILE '\N\R\.\a\u\x
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: NR.aux,v 1.9 86/06/22 18:13:16 dick Exp $
- X
- X#
- X# N a m e o f R e p o s i t o r y
- X# Script, to be included.
- X#
- X# Assumes set:
- X# $Name
- X# $Repository
- X#
- X# Determines the name of the RCS repository and sets $Repository
- X# accordingly.
- X#
- X
- Xif # there is no administration directory
- X [ ! -d CVS.adm ]
- Xthen
- X echo $Name: there is no version here\; do CV first >&2
- X exit 1
- Xfi
- X
- X# compatibility patch P A T C H
- Xif # this is an old administration
- X [ ! -r CVS.adm/Repository -a -r CVS.adm/RCSDIR ]
- Xthen # update the name of the repository file
- X mv CVS.adm/RCSDIR CVS.adm/Repository
- Xfi
- X
- Xif # the necessary files are there
- X [ -r CVS.adm/Repository -a -r CVS.adm/Entries ]
- Xthen # read the name of the RCS repository from the file
- X Repository=`cat CVS.adm/Repository`
- Xelse # no good
- X echo $Name: \*PANIC\* administration files missing >&2
- X exit 1
- Xfi
- X
- Xif # the promised repository isn't there
- X [ ! -d $Repository ]
- Xthen
- X echo $Name: there is no repository $Repository >&2
- X exit 1
- Xfi
- X
- Xexport Repository
- + END-OF-FILE NR.aux
- chmod 'u=rwx,g=rx,o=rx' \N\R\.\a\u\x
- set `sum \N\R\.\a\u\x`
- sum=$1
- case $sum in
- 43511) :;;
- *) echo 'Bad sum in '\N\R\.\a\u\x >&2
- esac
- echo Extracting \O\P\.\a\u\x
- sed 's/^X//' > \O\P\.\a\u\x << '+ END-OF-FILE '\O\P\.\a\u\x
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: OP.aux,v 1.4 86/05/18 12:00:44 dick Exp $
- X
- X#
- X# O p t i o n s
- X# Script, to be included.
- X#
- X# Collects options from $@ and puts them in $Options
- X#
- X
- XGO_ON=true
- Xwhile # there may still be an option
- X $GO_ON
- Xdo
- X case $1 in
- X -*)
- X Options="$Options $1"
- X shift
- X ;;
- X *)
- X GO_ON=false
- X ;;
- X esac
- Xdone
- + END-OF-FILE OP.aux
- chmod 'u=rw,g=r,o=r' \O\P\.\a\u\x
- set `sum \O\P\.\a\u\x`
- sum=$1
- case $sum in
- 38435) :;;
- *) echo 'Bad sum in '\O\P\.\a\u\x >&2
- esac
- echo Extracting \R\G\.\a\u\x
- sed 's/^X//' > \R\G\.\a\u\x << '+ END-OF-FILE '\R\G\.\a\u\x
- X#!/bin/sh
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: RG.aux,v 1.11 86/06/09 14:37:57 dick Exp $
- X
- X#
- X# R e g i s t e r
- X# Enters file $1 into the administration with version number $2
- X# and time stamp $3. Removes the old entry first, if necessary.
- X#
- X# Assumes set:
- X# $CVSLIB
- X#
- X
- X$CVSLIB/SC.aux $1 # scratch the entry
- Xecho "$2|$3|" >>CVS.adm/Entries # and append a new one
- + END-OF-FILE RG.aux
- chmod 'u=rwx,g=rx,o=rx' \R\G\.\a\u\x
- set `sum \R\G\.\a\u\x`
- sum=$1
- case $sum in
- 13059) :;;
- *) echo 'Bad sum in '\R\G\.\a\u\x >&2
- esac
- echo Extracting \S\C\.\a\u\x
- sed 's/^X//' > \S\C\.\a\u\x << '+ END-OF-FILE '\S\C\.\a\u\x
- X#!/bin/sh
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: SC.aux,v 1.8 86/05/18 12:01:59 dick Exp $
- X
- X#
- X# S c r a t c h
- X# Scratches file $1 from the administration
- X#
- X
- Xmv CVS.adm/Entries CVS.adm/Entries.Backup
- Xfgrep -v " $1|" CVS.adm/Entries.Backup >CVS.adm/Entries
- + END-OF-FILE SC.aux
- chmod 'u=rwx,g=rx,o=rx' \S\C\.\a\u\x
- set `sum \S\C\.\a\u\x`
- sum=$1
- case $sum in
- 30030) :;;
- *) echo 'Bad sum in '\S\C\.\a\u\x >&2
- esac
- echo Extracting \S\L\.\a\u\x
- sed 's/^X//' > \S\L\.\a\u\x << '+ END-OF-FILE '\S\L\.\a\u\x
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: SL.aux,v 1.2 86/06/22 18:14:12 dick Exp $
- X
- X#
- X# S e t L o c k
- X# Script, to be included.
- X#
- X# Assumes set:
- X# $LCK name of lock
- X# $LDR name of directory to be locked
- X# $Name
- X#
- X# Persistently tries to make the directory $LCK, which serves as
- X# a lock.
- X#
- X
- Xuntil # we can enter the critical section
- X trap '' 1 2 3 15 # play deaf
- X mkdir $LCK >/dev/null 2>/dev/null
- Xdo
- X # we missed it this cycle
- X echo $Name: `date`: waiting for access to $LDR
- X
- X # sleep with both ears open
- X trap 'exit 1' 1 2 3 15
- X sleep 60
- Xdone
- + END-OF-FILE SL.aux
- chmod 'u=rw,g=r,o=r' \S\L\.\a\u\x
- set `sum \S\L\.\a\u\x`
- sum=$1
- case $sum in
- 01189) :;;
- *) echo 'Bad sum in '\S\L\.\a\u\x >&2
- esac
- echo Extracting \V\N\.\a\u\x
- sed 's/^X//' > \V\N\.\a\u\x << '+ END-OF-FILE '\V\N\.\a\u\x
- X#!/bin/sh
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: VN.aux,v 1.8 86/06/09 14:38:22 dick Exp $
- X
- X#
- X# V e r s i o n N u m b e r
- X# Writes the version number of the most recent revision of $1
- X# to standard output.
- X# This is sloppy, but the only way to do it, short of analysing
- X# the *,v file itself.
- X#
- X# Assumes set:
- X# $RCSBIN
- X#
- X
- X( # The following stupid construction is necessary, since the
- X # shell sometimes generates a NL when a pipe breaks, as it
- X # does here, where sed stops after a few lines. Letting
- X # sed process all the rest is also a shame.
- X #
- X$RCSBIN/rlog $1 |
- Xsed -n '
- X /^head:/{
- X s/.* //p
- X q
- X }
- X'
- X) 2>/dev/null
- + END-OF-FILE VN.aux
- chmod 'u=rwx,g=rx,o=rx' \V\N\.\a\u\x
- set `sum \V\N\.\a\u\x`
- sum=$1
- case $sum in
- 46756) :;;
- *) echo 'Bad sum in '\V\N\.\a\u\x >&2
- esac
- echo Extracting \V\T\.\a\u\x
- sed 's/^X//' > \V\T\.\a\u\x << '+ END-OF-FILE '\V\T\.\a\u\x
- X# This file is part of the Concurrent Versions System CVS.
- X# Written by Dick Grune, Vrije Universiteit, Amsterdam.
- X# $Header: VT.aux,v 1.16 86/06/09 10:03:15 dick Exp $
- X
- X#
- X# V e r s i o n & T i m e S t a m p
- X# Script, to be included.
- X#
- X# Assumes set:
- X# $CVSLIB
- X# $Rcs
- X# $User
- X#
- X# Sets the following shell variables:
- X# VN_User version # of the RCS file the user file derives from
- X# may also be:
- X# empty: no entry for user file
- X# 0: user file is new
- X# -$VN_User: user file is to be removed
- X# VN_Rcs version # of active RCS file
- X# is empty for absent RCS file
- X# TS_User present time stamp of the user file
- X# is empty for absent user file
- X# TS_Rcs time stamp of the lastest check-out of the RCS file.
- X#
- X# The syntax of an entry is
- X# <version-number>|<time-stamp>|
- X# and since the time stamp is obtained through ls, it includes
- X# the file name.
- X#
- X
- XVN_Rcs=`$CVSLIB/VN.aux $Rcs`
- X
- Xif # the user file exists
- X [ -r $User ]
- Xthen #get its time stamp
- X TS_User=`ls -ld $User`
- Xelse # yield null
- X TS_User=
- Xfi
- X
- XENTRY=`fgrep " $User|" CVS.adm/Entries`
- Xif # the entry is non-empty
- X [ "$ENTRY" != "" ]
- Xthen # dissect it
- X VN_User=`expr "$ENTRY" : '\(.*\)|.' `
- X TS_Rcs=`expr "$ENTRY" : '.*|\(.*\)|' `
- Xelse # yield nulls
- X VN_User=
- X TS_Rcs=
- Xfi
- + END-OF-FILE VT.aux
- chmod 'u=rwx,g=rx,o=rx' \V\T\.\a\u\x
- set `sum \V\T\.\a\u\x`
- sum=$1
- case $sum in
- 60984) :;;
- *) echo 'Bad sum in '\V\T\.\a\u\x >&2
- esac
- exit 0
-