a5f4b9478d
cleanup. A round-trip (./freebsd-pre-merge.sh ; ./freebsd-post-merge.sh) now results in an unchanged working copy.
18 lines
425 B
Bash
Executable File
18 lines
425 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
:>keywords
|
|
:>rcsid
|
|
find . -type f -name '*.[1-9ch]' | cut -c 3- | \
|
|
while read f ; do
|
|
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 || /__RCSID/) && /\$FreeBSD[:\$]/);
|
|
'
|