#!/bin/sh
#
# Created by: Bjorn Nelson 051219
#
# Description: Automatically checkin RCS'ed config files
#
# Reasoning: This script is to ensure that RCS'ed files get versioned
#  even with changes that are done with out one being aware the file is
#  under RCS.  The danger is that you might not want a file to be checked in
#  overnight, in this case change the extension and use the -x command.
#

CI_LOC="/usr/bin/ci"
FILENAME="$1"
MESSAGE="Automated ci called from $0"

if [ ! $FILENAME ]; then
  echo "Usage: $0 filename"
  exit 1
fi

if [ ! -f $FILENAME ]; then
  echo "Could not file file: $FILENAME"
  exit 1
fi

if [ -f "$FILENAME,v" -o -f "RCS/$FILENAME,v" ]; then
  ${CI_LOC} -l -m"${MESSAGE}" $1
fi


