#!/bin/sh -e if [ $# -lt 1 ]; then echo "Usage: $0 file[: ]revision ..." exit 1 fi while [ $# -gt 0 ]; do filerev=$1; shift file=`echo $filerev | cut -d: -f1` revision=`echo ${filerev}: | cut -d: -f2` if [ -z "$revision" ]; then if [ $# -lt 1 ]; then echo "ERROR: No revision specified for $file" exit 1 fi revision=$1; shift fi if [ ! -f "$file" ]; then echo "ERROR: $file not found" continue fi dir="`dirname $file`" tag="`cat $dir/CVS/Tag | sed -e 's/^T//'`" basetag="`echo $tag | sed -e 's/-local.*//'`" version="`echo $basetag | sed -e 's/_/./g'`" cvs tag -F -r $revision $tag-lastpatch $file done