1 # $FreeBSD: src/crypto/openssh/FREEBSD-tricks,v 1.2.4.1 2003/02/03 17:31:06 des Exp $
2 # $DragonFly: src/crypto/openssh/Attic/FREEBSD-tricks,v 1.2 2003/06/17 04:24:36 dillon Exp $
4 # Shell code to remove FreeBSD tags before merging
5 grep -rl '\$Fre.BSD:' . |
7 sed -i.orig -e '/\$Fre.BSD:/d' $f
10 # Shell + Perl code to add FreeBSD tags wherever an OpenBSD or Id tag occurs
11 egrep -rl '\$(Id|OpenBSD):' . |
12 xargs perl -n -i.orig -e 'print; s/\$(Id|OpenBSD): [^\$]*\$/\$FreeBSD\$/ && print'
14 # Shell code to reexpand FreeBSD tags
15 grep -rl '\$FreeBSD\$' . |
17 id=$(cvs diff $f | grep '\$Fre.BSD:' | sed 's/.*\(\$Fre.BSD:.*\$\).*/\1/') ;
18 if [ -n "$id" ] ; then
19 sed -i.orig -e "s@\\\$Fre.BSD\\\$@$id@" $f ;