aboutsummaryrefslogblamecommitdiff
path: root/crypto/openssh/freebsd-pre-merge.sh
blob: f98e71822a0ce2acb32a8fd5ceec563c698e1964 (plain) (tree)
1
2
3
4
5
6
7
8
9




           

          
                
                 
                                                                         


                                                      
                                                

                                                                          
#!/bin/sh
#
# $FreeBSD$
#

:>keywords
:>rcsid
git ls-files | \
while read f ; do
	egrep -l '^(#|\.\\"|/\*)[[:space:]]+\$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[:\$]/);
'