freebsd-skq/crypto/openssh/FREEBSD-tricks
2003-04-23 17:21:55 +00:00

20 lines
573 B
Plaintext

# $FreeBSD$
# Shell code to remove FreeBSD tags before merging
grep -rl '\$Fre.BSD:' . >tags
while read f < tags ; do
sed -i.orig -e '/\$Fre.BSD:/d' $f
done
# Shell + Perl code to add FreeBSD tags wherever an OpenBSD or Id tag occurs
cat tags |
xargs perl -n -i.orig -e 'print; s/\$(Id|OpenBSD): [^\$]*\$/\$FreeBSD\$/ && print'
# Shell code to reexpand FreeBSD tags
while read f < tags ; do
id=$(cvs diff $f | grep '\$Fre.BSD:' | sed 's/.*\(\$Fre.BSD:.*\$\).*/\1/') ;
if [ -n "$id" ] ; then
sed -i.orig -e "s@\\\$Fre.BSD\\\$@$id@" $f ;
fi ;
done