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.
This commit is contained in:
parent
d7633a3070
commit
50356f4843
@ -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
|
||||
|
@ -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[:\$]/);
|
||||
'
|
||||
|
Loading…
Reference in New Issue
Block a user