summaryrefslogtreecommitdiffhomepage
path: root/kernel-tree-scripts/create-patch.sh
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-07-28 15:42:03 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-08-02 02:55:43 +0200
commit13e89d486079dfbe3b80a62d810c5ec4fad4c88b (patch)
tree4670ee3ffedafdf3c00236cd7b5b63b4f7aa92b5 /kernel-tree-scripts/create-patch.sh
parent427773bb1732d2742994141a3a3b5ab63ab87f1d (diff)
contrib: move patchers to contrib/kernel-tree
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'kernel-tree-scripts/create-patch.sh')
-rwxr-xr-xkernel-tree-scripts/create-patch.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel-tree-scripts/create-patch.sh b/kernel-tree-scripts/create-patch.sh
new file mode 100755
index 0000000..93b7bed
--- /dev/null
+++ b/kernel-tree-scripts/create-patch.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+WG="$(readlink -f "$(dirname "$(readlink -f "$0")")/../../src/")"
+
+for i in "$WG"/*.c "$WG"/*.h "$WG"/crypto/*.c "$WG"/crypto/*.h "$WG"/crypto/*.S "$WG"/Kbuild "$WG"/Kconfig; do
+ diff -u /dev/null "$i" | sed "s:${WG}:b/net/wireguard:;s:Kbuild:Makefile:"
+done
+
+cat <<_EOF
+--- a/net/Kconfig
++++ b/net/Kconfig
+@@ -85,1 +85,2 @@ config INET
+ if INET
++source "net/wireguard/Kconfig"
+--- a/net/Makefile
++++ b/net/Makefile
+@@ -8,1 +8,2 @@
+ obj-\$(CONFIG_NET) := socket.o core/
++obj-\$(CONFIG_WIREGUARD) += wireguard/
+_EOF