#!/bin/sh
#	This file is part of the Concurrent Versions System CVS.
#	Written by Dick Grune, Vrije Universiteit, Amsterdam.
#	$Header: LS,v 1.20 86/06/22 18:12:16 dick Exp $

#
#		L i s t   i n f o r m a t i o n
#	Prints three lines of information for each of its arguments,
#	one for the user file (line 1), one for the newest RCS file
#	(line 3) and one for the RCS file both derive from (line 2).
#
Name=LS; export Name

# CVSBIN, CVSLIB and RCSBIN directories
CVSBIN=/user1/dick/cvs
CVSLIB=/user1/dick/cvs
RCSBIN=${RCSBIN-/usr/new}
export CVSBIN CVSLIB RCSBIN

# avoid spurious identifications
PATH=${CVSPATH-/bin:/usr/bin}; export PATH

# determine the name of the repository
. $CVSLIB/NR.aux

for User in $@
do
	. $CVSLIB/LR.aux	# sets $Rcs to $Repository/$User,v or /Attic/
	. $CVSLIB/VT.aux	# sets $VN_User, $VN_Rcs, $TS_User, $TS_Rcs
	
	case "$TS_User" in
	"")
		echo "User:	no user file $User"
		;;
	*)
		echo "User:		$TS_User"
		;;
	esac
	
	case $VN_User in
	"")
		echo "From:	no entry for $User"
		;;
	0)
		# a new file
		echo "From:	new	message: `<$User,t sed '1!d'`"
		;;
	*)
		echo "From:	$VN_User	$TS_Rcs"
		;;
	esac
	
	case $VN_Rcs in
	"")
		echo "RCS:	no $Rcs"
		;;
	*)
		echo "RCS:	$VN_Rcs	$Rcs"
		;;
	esac
	echo ''
done
