aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh/freebsd-pre-merge.sh
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2014-03-24 19:15:13 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2014-03-24 19:15:13 +0000
commitcf783db1520617602a762fe74663985b3d7354c8 (patch)
tree14111e04c59f0b565d8a20f5e13a60b25ce5b287 /crypto/openssh/freebsd-pre-merge.sh
parentb646225a13e0d7209740c94964d83528117730c9 (diff)
downloadsrc-cf783db1520617602a762fe74663985b3d7354c8.tar.gz
src-cf783db1520617602a762fe74663985b3d7354c8.zip
Add a pre-merge script which reverts mechanical changes such as added
$FreeBSD$ tags and man page dates. Add a post-merge script which reapplies these changes. Run both scripts to normalize the existing code base. As a result, many files which should have had $FreeBSD$ tags but didn't now have them. Partly rewrite the upgrade instructions and remove the now outdated list of tricks.
Notes
Notes: svn path=/head/; revision=263691
Diffstat (limited to 'crypto/openssh/freebsd-pre-merge.sh')
-rwxr-xr-xcrypto/openssh/freebsd-pre-merge.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/crypto/openssh/freebsd-pre-merge.sh b/crypto/openssh/freebsd-pre-merge.sh
new file mode 100755
index 000000000000..2db9fd8f1366
--- /dev/null
+++ b/crypto/openssh/freebsd-pre-merge.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+find . -type f -name '*.[1-9ch]' | cut -c 3- | \
+while read f ; do
+ svn propget svn:keywords $f | grep -q . && echo $f
+done >keywords
+xargs perl -n -i -e '
+ $strip = $ARGV if /\$(Id|OpenBSD):.*\$/;
+ print unless ($strip eq $ARGV && /\$FreeBSD.*\$/);
+' <keywords
+
+find . -type f -name '*.[1-9]' | cut -c 3- | \
+ xargs grep -l '^\.Dd ' . >mdocdates
+xargs perl -p -i -e '
+ s/^\.Dd (\w+) (\d+), (\d+)$/.Dd \$Mdocdate: $1 $2 $3 \$/;
+' <mdocdates