2014-03-24 19:15:13 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2016-01-19 12:38:53 +00:00
|
|
|
:>keywords
|
|
|
|
:>rcsid
|
2014-03-24 19:15:13 +00:00
|
|
|
find . -type f -name '*.[1-9ch]' | cut -c 3- | \
|
|
|
|
while read f ; do
|
2016-01-19 12:38:53 +00:00
|
|
|
svn proplist -v $f | grep -q 'FreeBSD=%H' || continue
|
2016-01-19 13:15:57 +00:00
|
|
|
egrep -l '(\.\\"|/\*) \$FreeBSD[:\$]' $f >>keywords
|
2016-01-19 12:38:53 +00:00
|
|
|
egrep -l '__RCSID\("\$FreeBSD[:\$]' $f >>rcsid
|
|
|
|
done
|
|
|
|
sort -u keywords rcsid | xargs perl -n -i -e '
|
2014-03-24 19:15:13 +00:00
|
|
|
$strip = $ARGV if /\$(Id|OpenBSD):.*\$/;
|
2016-01-19 12:38:53 +00:00
|
|
|
print unless (($strip eq $ARGV || /__RCSID/) && /\$FreeBSD[:\$]/);
|
|
|
|
'
|