freebsd-nq/crypto/openssh/FREEBSD-tricks

21 lines
609 B
Plaintext
Raw Normal View History

2002-10-29 09:56:16 +00:00
# $FreeBSD$
# Shell code to remove FreeBSD tags before merging
2005-09-03 06:42:11 +00:00
grep -rl '\$Fre[e]BSD:' . | grep -v FREEBSD >tags
2003-09-19 11:29:51 +00:00
cat tags | while read f ; do
sed -i.orig -e '/\$Fre[e]BSD:/d' $f
2002-10-29 09:56:16 +00:00
done
# Shell + Perl code to add FreeBSD tags wherever an OpenBSD or Id tag occurs
cat tags |
2005-09-03 06:42:11 +00:00
xargs perl -n -i.orig -e 'print; s/\$(Id|OpenBSD): [^\$]*/\$FreeBSD/ && print'
2002-10-29 09:56:16 +00:00
# Shell code to reexpand FreeBSD tags
2003-09-19 11:29:51 +00:00
cat tags | while read f ; do
id=$(cvs diff $f | grep '\$Fre[e]BSD:' |
sed 's/.*\(\$Fre[e]BSD:.*\$\).*/\1/') ;
if [ -n "$id" ] ; then
sed -i.orig -e "s@\\\$Fre[e]BSD\\\$@$id@" $f ;
fi ;
2002-10-29 09:56:16 +00:00
done