mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-30 08:19:09 +00:00
Protect against tag expansion + fix some brainos.
This commit is contained in:
parent
ef8cdc4065
commit
dd5f4be98b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106129
@ -1,20 +1,20 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# Shell code to remove FreeBSD tags before merging
|
||||
grep -rl '\$FreeBSD:' |
|
||||
grep -rl '\$Fre.BSD:' . |
|
||||
while read f ; do
|
||||
sed -i.orig -e '/\$FreeBSD:/d'
|
||||
sed -i.orig -e '/\$Fre.BSD:/d' $f
|
||||
done
|
||||
|
||||
# Shell + Perl code to add FreeBSD tags wherever an OpenBSD or Id tag occurs
|
||||
egrep -rl '\$(Id|OpenBSD):' |
|
||||
egrep -rl '\$(Id|OpenBSD):' . |
|
||||
xargs perl -n -i.orig -e 'print; s/\$(Id|OpenBSD): [^\$]*\$/\$FreeBSD\$/ && print'
|
||||
|
||||
# Shell code to reexpand FreeBSD tags
|
||||
grep -rl '\$FreeBSD\$' |
|
||||
grep -rl '\$FreeBSD\$' . |
|
||||
while read f ; do
|
||||
id=$(cvs diff $f | grep '\$FreeBSD$FreeBSD$\).*/\1/') ;
|
||||
id=$(cvs diff $f | grep '\$Fre.BSD:' | sed 's/.*\(\$Fre.BSD:.*\$\).*/\1/') ;
|
||||
if [ -n "$id" ] ; then
|
||||
sed -i.orig -e "s@\\\$FreeBSD\\\$@$id@" $f ;
|
||||
sed -i.orig -e "s@\\\$Fre.BSD\\\$@$id@" $f ;
|
||||
fi ;
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user