1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
freebsd/crypto/openssh/freebsd-pre-merge.sh
Dag-Erling Smørgrav cf783db152 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.
2014-03-24 19:15:13 +00:00

20 lines
468 B
Bash
Executable File

#!/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