summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2016-01-19 12:38:53 +0000
committerdes <des@FreeBSD.org>2016-01-19 12:38:53 +0000
commita5f4b9478d37848cb30b99ef4a000aa29e01be69 (patch)
tree1f29e78551901e985c8941dec576061bd9fa838c /crypto
parent4ed23bd8873f4a4312b4b02412b889dbe546668c (diff)
downloadFreeBSD-src-a5f4b9478d37848cb30b99ef4a000aa29e01be69.zip
FreeBSD-src-a5f4b9478d37848cb30b99ef4a000aa29e01be69.tar.gz
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.
Diffstat (limited to 'crypto')
-rwxr-xr-xcrypto/openssh/freebsd-post-merge.sh8
-rwxr-xr-xcrypto/openssh/freebsd-pre-merge.sh20
2 files changed, 13 insertions, 15 deletions
diff --git a/crypto/openssh/freebsd-post-merge.sh b/crypto/openssh/freebsd-post-merge.sh
index eefe3af..b9e4cbd 100755
--- a/crypto/openssh/freebsd-post-merge.sh
+++ b/crypto/openssh/freebsd-post-merge.sh
@@ -6,9 +6,9 @@
xargs perl -n -i -e '
print;
s/\$(Id|OpenBSD): [^\$]*/\$FreeBSD/ && print;
- m/^\#include "includes.h"/ && print "__RCSID(\"\$FreeBSD\$\");\n";
' <keywords
-xargs perl -p -i -e '
- s/^\.Dd \$Mdocdate: (\w+) (\d+) (\d+) \$$/.Dd $1 $2, $3/
-' <mdocdates
+xargs perl -n -i -e '
+ print;
+ m/^\#include "includes.h"/ && print "__RCSID(\"\$FreeBSD\$\");\n";
+' <rcsid
diff --git a/crypto/openssh/freebsd-pre-merge.sh b/crypto/openssh/freebsd-pre-merge.sh
index 2db9fd8..5d4be63 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[:\$]/);
+'
OpenPOWER on IntegriCloud