Initial release from Günther Leber (guenther@adcon.at)

This commit is contained in:
hjp 1998-08-03 09:58:57 +00:00
parent 40b44cbcdf
commit 8bb8ebe167
2 changed files with 79 additions and 0 deletions

24
rcstell/GNUmakefile Normal file
View File

@ -0,0 +1,24 @@
include GNUmakerules
include GNUmakevars
count:
install: $(ROOT)/usr/local/bin/rcstell \
$(ROOT)/usr/local/bin/rcsinfo \
install_all:
$(MAKE) install ROOT=/nfs/wsrdb
$(MAKE) install ROOT=/nfs/wsrcom
$(MAKE) install ROOT=/nfs/wifosv
$(MAKE) install ROOT=/nfs/ihssv
$(MAKE) install ROOT=/nfs/wsrtest
$(ROOT)/usr/local/bin/rcsinfo: $(ROOT)/usr/local/bin/rcstell
ln -s $< $@
$(ROOT)/usr/local/man/man8/%.8: %.man
$(INSTALL) $< $@
clean:
rm count

55
rcstell/rcstell Executable file
View File

@ -0,0 +1,55 @@
#!/bin/sh
if [ $# -gt 1 ]
then
echo "Usage is: $0 [directory]" >&2
exit 1
fi
NAME=`basename $0`
if [ $# -eq 1 ]
then
DIR=`echo "$1" | sed -e 's+/RCS/*$++'`
cd "$DIR"
fi
if [ ! -d RCS ]
then
echo "$0: no RCS directory" >&2
exit 2
fi
OIFS="$IFS"
IFS='
'
ALLFILES=`ls RCS/* | sed -e 's+^RCS/\(.*\),v+\1+'`
FILES=`grep '^locks$' /dev/null RCS/* | sed -e 's+^RCS/\(.*\),v:locks+\1+'`
FILEDIFF=`( echo "$ALLFILES"; echo "$FILES" ) | sort | uniq -u`
for I in $FILES
do
IFS=${OIFS}:';'
set `awk '/^locks/,/;$/ { print }' RCS/${I},v`
LOCKER=$2
VERSION=$3
case "$NAME"
in
rcsinfo) echo "$I: version $VERSION locked by $LOCKER" ;;
rcstell) echo $I ;;
*) echo "Internal error: command $NAME unknown" >&2
exit 1
;;
esac
done
IFS='
'
for I in $FILEDIFF
do
case "$NAME"
in
rcsinfo) echo $I;;
esac
done
exit 0