Files
amneziawg-linux-kernel-module/kernel-tree-scripts/create-patch.sh
Jason A. Donenfeld 60e2e7ad61 create-patch: blacklist instead of whitelist
This will deal with filename changes more gracefully.

Reported-by: Jordan Glover <Golden_Miller83@protonmail.ch>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-08 03:14:52 +02:00

29 lines
757 B
Bash
Executable File

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
shopt -s globstar
WG="$(readlink -f "$(dirname "$(readlink -f "$0")")/../../src/")"
for i in "$WG"/**/{*.c,*.h,*.S,*.include} "$WG/Kbuild" "$WG/Kconfig"; do
[[ $i == "$WG/tools/"* || $i == "$WG/tests/"* ]] && continue
diff -u /dev/null "$i" | sed "s:${WG}:b/net/wireguard:;s:Kbuild:Makefile:"
done
cat <<_EOF
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -85,2 +85,3 @@ config INET
if INET
+source "net/wireguard/Kconfig"
source "net/ipv4/Kconfig"
--- a/net/Makefile
+++ b/net/Makefile
@@ -16,2 +16,3 @@
obj-\$(CONFIG_NETFILTER) += netfilter/
+obj-\$(CONFIG_WIREGUARD) += wireguard/
obj-\$(CONFIG_INET) += ipv4/
_EOF