From ef8cdc406529c21ffd01e4d3932dcea08f2834ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Tue, 29 Oct 2002 09:56:16 +0000 Subject: [PATCH] Some tricks I use when I upgrade. --- crypto/openssh/FREEBSD-tricks | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 crypto/openssh/FREEBSD-tricks diff --git a/crypto/openssh/FREEBSD-tricks b/crypto/openssh/FREEBSD-tricks new file mode 100644 index 00000000000..9d09e2eb268 --- /dev/null +++ b/crypto/openssh/FREEBSD-tricks @@ -0,0 +1,20 @@ +# $FreeBSD$ + +# Shell code to remove FreeBSD tags before merging +grep -rl '\$FreeBSD:' | +while read f ; do + sed -i.orig -e '/\$FreeBSD:/d' +done + +# Shell + Perl code to add FreeBSD tags wherever an OpenBSD or Id tag occurs +egrep -rl '\$(Id|OpenBSD):' | +xargs perl -n -i.orig -e 'print; s/\$(Id|OpenBSD): [^\$]*\$/\$FreeBSD\$/ && print' + +# Shell code to reexpand FreeBSD tags +grep -rl '\$FreeBSD\$' | +while read f ; do + id=$(cvs diff $f | grep '\$FreeBSD$FreeBSD$\).*/\1/') ; + if [ -n "$id" ] ; then + sed -i.orig -e "s@\\\$FreeBSD\\\$@$id@" $f ; + fi ; +done