#!/bin/ksh # # $Revision: 1.2 $ $Date: 2009/11/25 00:04:48 $ # $Source: /home/vogelke/bin/RCS/newvers,v $ # $Host: example.com $ # $UUID: 1954791c-9c19-3571-bd2a-498b226735b9 $ # # $file case "$#" in 0) echo checkin | ci -q ${file} # minor version rcs -q -U ${file} showme ;; *) arg="$1" if test -f ${file},v; then # major version set X $(head -1 ${file},v | tr ';.' ' ') major=$(($3 + 1)) else major=1 fi # We have an argument, is it numeric? expr "$arg" : "[0-9]*$" > /dev/null && major=$arg echo checkin | ci -r${major}.1 -q ${file} rcs -q -U ${file} showme ;; esac exit 0