#!/bin/ksh
#
# $Revision: 1.3 $ $Date: 2012-07-26 17:11:49-04 $
# $Source: /home/vogelke/bin/RCS/vers,v $
# $Host: sys7.com $
# $UUID: 3ff5a452-b7ea-3ba2-b6c8-d57c4c97b29b $
#
#<vers: show current version number, if any.

PATH=/bin:/usr/bin:/usr/local/bin
export PATH
file=.version
rc=0

# Why get rid of the period and then add it back?  It makes the tr
# commands completely consistent between newvers and vers.

if test -f ${file},v; then
    set X $(head -1 ${file},v | tr ';.' '  ')
    case "$#" in
        4) echo $3.$4 ;;
        *) echo "${file},v is not an RCS file" >& 2; rc=1 ;;
    esac
else
    echo "no version file" >& 2
    rc=2
fi

exit $rc
