freebsd-nq/crypto/openssh/FREEBSD-tricks

20 lines
581 B
Plaintext
Raw Normal View History

2002-10-29 09:56:16 +00:00
# $FreeBSD$
# Shell code to remove FreeBSD tags before merging
grep -rl '\$Fre.BSD:' . >tags
2003-09-19 11:29:51 +00:00
cat tags | while read f ; do
sed -i.orig -e '/\$Fre.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 |
2002-10-29 09:56:16 +00:00
xargs perl -n -i.orig -e 'print; s/\$(Id|OpenBSD): [^\$]*\$/\$FreeBSD\$/ && print'
# 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.BSD:' | sed 's/.*\(\$Fre.BSD:.*\$\).*/\1/') ;
if [ -n "$id" ] ; then
sed -i.orig -e "s@\\\$Fre.BSD\\\$@$id@" $f ;
fi ;
2002-10-29 09:56:16 +00:00
done