#!/bin/csh -f
#
# :installfile file directory 
#
# rcsid $Header$
#

if ($#argv != 2) then
    Usage:  :installfile file directory
    exit 1
endif

set file=$argv[1]
set direct=$argv[2]

set fnew = ${direct}/${file}
set fold = ${direct}/${file}.old

if (-e ${fnew}) then
    rm -f ${fold}
    mv ${fnew} ${fold}
    if (-e ${fnew}) then
	echo ":installfile : Failed to move file ${fnew} to ${fold}"
	exit 3
    endif
endif

cp ${file} ${fnew}
exit $status
