From 8bb8ebe16734c09c70461f7f1810e26a9083a698 Mon Sep 17 00:00:00 2001 From: hjp Date: Mon, 3 Aug 1998 09:58:57 +0000 Subject: [PATCH] =?UTF-8?q?Initial=20release=20from=20G=C3=BCnther=20Leber?= =?UTF-8?q?=20(guenther@adcon.at)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rcstell/GNUmakefile | 24 ++++++++++++++++++++ rcstell/rcstell | 55 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 rcstell/GNUmakefile create mode 100755 rcstell/rcstell diff --git a/rcstell/GNUmakefile b/rcstell/GNUmakefile new file mode 100644 index 0000000..c8beb65 --- /dev/null +++ b/rcstell/GNUmakefile @@ -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 diff --git a/rcstell/rcstell b/rcstell/rcstell new file mode 100755 index 0000000..ffadf28 --- /dev/null +++ b/rcstell/rcstell @@ -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