#!/bin/sh
#	This file is part of the Concurrent Versions System CVS.
#	Written by Dick Grune, Vrije Universiteit, Amsterdam.
#	$Header: Install,v 1.9 86/06/13 18:00:24 dick Exp $

#
#		I n s t a l l
#	Installs $1 in the directory $2; the file is updated to reflect
#	that the auxiliaries are in $3 and the RCS binaries in $4.
#	The directory names $2, $3 and $4 have to be absolute paths.
#	The pair "[ ... ]", used for testing in more advanced shells, is
#	replaced by the more portable "test ..."
#	So, a call might look like
#		Install GC /usr/local `pwd` /usr/local
#

cat $1 |
sed "
	s|^CVSBIN=.*|CVSBIN=$2|
	s|^CVSLIB=.*|CVSLIB=$3|
	s|^RCSBIN=.*|RCSBIN=\${RCSBIN-$4}|
	s|^\([^#]*\)\[ \(.*\) \]|\1test \2|
" >$2/$1

chmod +x $2/$1
