aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh/freebsd-pre-merge.sh
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2016-01-19 12:38:53 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2016-01-19 12:38:53 +0000
commit50356f48430cbc194f2354a045975f60559f0f1d (patch)
tree1f29e78551901e985c8941dec576061bd9fa838c /crypto/openssh/freebsd-pre-merge.sh
parentd7633a30701ea5f19cd87c2ad383c23ec5760019 (diff)
downloadsrc-50356f48430cbc194f2354a045975f60559f0f1d.tar.gz
src-50356f48430cbc194f2354a045975f60559f0f1d.zip
Update the pre- and post-merge scripts to work correctly after the recent
cleanup. A round-trip (./freebsd-pre-merge.sh ; ./freebsd-post-merge.sh) now results in an unchanged working copy.
Notes
Notes: svn path=/head/; revision=294320
Diffstat (limited to 'crypto/openssh/freebsd-pre-merge.sh')
-rwxr-xr-xcrypto/openssh/freebsd-pre-merge.sh20
1 files changed, 9 insertions, 11 deletions
diff --git a/crypto/openssh/freebsd-pre-merge.sh b/crypto/openssh/freebsd-pre-merge.sh
index 2db9fd8f1366..5d4be6378f0d 100755
--- a/crypto/openssh/freebsd-pre-merge.sh
+++ b/crypto/openssh/freebsd-pre-merge.sh
@@ -3,17 +3,15 @@
# $FreeBSD$
#
+:>keywords
+:>rcsid
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 '
+ svn proplist -v $f | grep -q 'FreeBSD=%H' || continue
+ egrep -l '/\* \$FreeBSD[:\$]' $f >>keywords
+ egrep -l '__RCSID\("\$FreeBSD[:\$]' $f >>rcsid
+done
+sort -u keywords rcsid | 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
+ print unless (($strip eq $ARGV || /__RCSID/) && /\$FreeBSD[:\$]/);
+'