summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/README2
-rw-r--r--tools/tools/mfc/mfc.awk30
2 files changed, 31 insertions, 1 deletions
diff --git a/tools/tools/README b/tools/tools/README
index 8b0d279..3656067 100644
--- a/tools/tools/README
+++ b/tools/tools/README
@@ -36,7 +36,7 @@ kerninclude Shellscript to find unused #includes in the kernel.
kernxref Shellscript to cross reference symbols in the LINT kernel.
kttcp An in-kernel version of the ttcp network performance tool
mfc Merge a directory from HEAD to a branch where it does not
- already exist.
+ already exist and other MFC related script(s).
mid Create a Message-ID database for mailing lists.
pciid Generate src/share/misc/pci_vendors.
portsinfo Generate list of new ports for last two weeks.
diff --git a/tools/tools/mfc/mfc.awk b/tools/tools/mfc/mfc.awk
new file mode 100644
index 0000000..f82c5c2
--- /dev/null
+++ b/tools/tools/mfc/mfc.awk
@@ -0,0 +1,30 @@
+#!/usr/bin/awk -f
+#
+# $FreeBSD$
+#
+
+BEGIN {
+ CVSROOT="ncvs:/home/ncvs"
+ UPDATEOPTS="-kk"
+}
+
+/^>/ {
+ sub(">[ ]*", "")
+}
+
+/^Revision/ || $1 == "" {
+ next
+}
+
+{
+ if (sub("1.", "") != 1)
+ next
+ if (!(match($2, "\\+[0-9]") && match($3, "-[0-9]")))
+ next
+ printf("cvs -d %s update %s -j 1.%d -j 1.%d %s\n", CVSROOT, UPDATEOPTS, $1 - 1, $1, $4)
+ files = files " " $4
+}
+
+END {
+ printf("cvs -d %s commit %s\n", CVSROOT, files);
+}
OpenPOWER on IntegriCloud