mirror of
https://github.com/opnsense/src.git
synced 2026-03-02 05:13:58 -05:00
20 lines
609 B
Text
20 lines
609 B
Text
# $FreeBSD$
|
|
|
|
# Shell code to remove FreeBSD tags before merging
|
|
grep -rl '\$Fre[e]BSD:' . | grep -v FREEBSD >tags
|
|
cat tags | while read f ; do
|
|
sed -i.orig -e '/\$Fre[e]BSD:/d' $f
|
|
done
|
|
|
|
# Shell + Perl code to add FreeBSD tags wherever an OpenBSD or Id tag occurs
|
|
cat tags |
|
|
xargs perl -n -i.orig -e 'print; s/\$(Id|OpenBSD): [^\$]*/\$FreeBSD/ && print'
|
|
|
|
# Shell code to reexpand FreeBSD tags
|
|
cat tags | while read f ; do
|
|
id=$(cvs diff $f | grep '\$Fre[e]BSD:' |
|
|
sed 's/.*\(\$Fre[e]BSD:.*\$\).*/\1/') ;
|
|
if [ -n "$id" ] ; then
|
|
sed -i.orig -e "s@\\\$Fre[e]BSD\\\$@$id@" $f ;
|
|
fi ;
|
|
done
|