Files
amneziawg-linux-kernel-module/kernel-tree-scripts/patch-kernel-builtin.sh
Jason A. Donenfeld f650e11c1e build system: revamp building and configuration
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-07-18 03:41:57 +02:00

13 lines
382 B
Bash
Executable File

#!/bin/sh
K="$1"
WG="$(readlink -f "$(dirname "$(readlink -f "$0")")/../src/")"
if [[ ! -e $K/net/Kconfig ]]; then
echo "You must specify the location of kernel sources as the first argument." >&2
exit 1
fi
sed -i "/^if INET\$/a source \"$WG/Kconfig\"" "$K/net/Kconfig"
echo "obj-y += ../../../../../../../../../../../../../../../../../../../../../..$WG/" >> "$K/net/Makefile"