2017-05-11 18:35:10 +02:00
|
|
|
#!/bin/bash
|
2017-11-30 15:23:50 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
#
|
2019-01-02 01:58:10 +01:00
|
|
|
# Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
2016-07-28 15:42:03 +02:00
|
|
|
|
2018-08-28 23:50:35 -06:00
|
|
|
shopt -s globstar
|
|
|
|
|
|
2019-12-26 16:59:50 +01:00
|
|
|
WG="$(readlink -f "$(dirname "$(readlink -f "$0")")/../src/")"
|
2016-07-28 15:42:03 +02:00
|
|
|
|
2018-11-19 19:59:54 +01:00
|
|
|
for i in "$WG"/**/{*.c,*.h,*.S,*.pl,*.include} "$WG/Kbuild" "$WG/Kconfig"; do
|
2019-12-26 16:59:50 +01:00
|
|
|
[[ $i == "$WG/tests/"* ]] && continue
|
2016-07-28 15:42:03 +02:00
|
|
|
diff -u /dev/null "$i" | sed "s:${WG}:b/net/wireguard:;s:Kbuild:Makefile:"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
cat <<_EOF
|
|
|
|
|
--- a/net/Kconfig
|
|
|
|
|
+++ b/net/Kconfig
|
2017-02-27 21:27:11 -08:00
|
|
|
@@ -85,2 +85,3 @@ config INET
|
2016-07-28 15:42:03 +02:00
|
|
|
if INET
|
|
|
|
|
+source "net/wireguard/Kconfig"
|
2017-02-27 21:27:11 -08:00
|
|
|
source "net/ipv4/Kconfig"
|
2016-07-28 15:42:03 +02:00
|
|
|
--- a/net/Makefile
|
|
|
|
|
+++ b/net/Makefile
|
2017-02-27 21:27:11 -08:00
|
|
|
@@ -16,2 +16,3 @@
|
2016-11-25 21:14:50 +01:00
|
|
|
obj-\$(CONFIG_NETFILTER) += netfilter/
|
2016-07-28 15:42:03 +02:00
|
|
|
+obj-\$(CONFIG_WIREGUARD) += wireguard/
|
2017-02-27 21:27:11 -08:00
|
|
|
obj-\$(CONFIG_INET) += ipv4/
|
2016-07-28 15:42:03 +02:00
|
|
|
_EOF
|