summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/FREEBSD-tricks
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/FREEBSD-tricks')
-rw-r--r--crypto/openssh/FREEBSD-tricks20
1 files changed, 20 insertions, 0 deletions
diff --git a/crypto/openssh/FREEBSD-tricks b/crypto/openssh/FREEBSD-tricks
new file mode 100644
index 0000000..9d09e2e
--- /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
OpenPOWER on IntegriCloud