#!/bin/sh
# rcsmv -- rename a file and the corresponding RCS file
#
# AUTHOR: Gary T. Leavens

if rcsdiff -q $1
then
    : # do nothing
else
    co -f -q -l $1 || exit 2
fi

if rcsdiff -q $1
then
    rm -f $1 && mv RCS/${1},v RCS/${2},v && co -l $2
else
    echo "You need to check in $1 first, or you will lose edits!" >&2
    exit 1
fi
