* fix check for CVS keywords

* extend check to all CVS keywords, suggested by kurt@

ok kurt@
This commit is contained in:
naddy 2007-10-01 20:39:23 +00:00
parent 8165440c6b
commit 44899eea9b

View File

@ -1,6 +1,6 @@
#!/bin/sh
# $OpenBSD: update-patches,v 1.16 2007/09/28 17:11:10 kurt Exp $
# $OpenBSD: update-patches,v 1.17 2007/10/01 20:39:23 naddy Exp $
# Copyright (c) 2000
# Marc Espie. All rights reserved.
# Redistribution and use in source and binary forms, with or without
@ -24,6 +24,10 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# Keywords expanded by CVS
keywords="Author|CVSHeader|Date|Header|Id|Name|Locker|Log|RCSfile|Revision"
keywords="$keywords|Source|State|OpenBSD"
# Find out all $PATCHORIG files and strip the name to what diff will use
cd $WRKDIST && find . -type f -name '*'${PATCHORIG} | \
fgrep -v Oops.rej.orig | \
@ -107,12 +111,12 @@ else
echo 1>&2 "No patch found"
fi
# Check for $Id: update-patches,v 1.16 2007/09/28 17:11:10 kurt Exp $ and similar bugs in all those patch files.
# Check for $Id: update-patches,v 1.17 2007/10/01 20:39:23 naddy Exp $ and similar bugs in all those patch files.
for i in $accounted
do
if sed -e '/1,^---/ d' $i|grep '$(Id|OpenBSD'
if sed -e '1,/^---/ d' $i|egrep -q '\$('"$keywords"').*\$'
then
echo 1>&2 "Problem with $i: CVS tag found in patch"
echo 1>&2 "Problem with $i: CVS keyword found in patch"
fi
done