freebsd-dev/crypto/openssh/freebsd-pre-merge.sh
Ed Maste 835ee05f3c ssh: drop $FreeBSD$ from crypto/openssh
After we moved to git $FreeBSD$ is no longer expanded and serves no
purpose.  Remove them from OpenSSH to reduce diffs against upstream.

Sponsored by:	The FreeBSD Foundation
2022-04-22 19:12:23 -04:00

15 lines
346 B
Bash
Executable File

#!/bin/sh
#
:>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[:\$]/);
'