diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-11 18:35:10 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-17 18:07:42 +0200 |
commit | dde5170b9ebe278eeadd8a5f8195ff9a9d4d6203 (patch) | |
tree | 49d5464ed2fa123832481b9134409ef342b4f05c /kernel-tree-scripts/jerry-rig.sh | |
parent | 41e7aa153984364087a9ef07eca02c72961825c7 (diff) |
jerry-rig: symlinks are better for tree patching
Use a symlink instead of lots of ../../..
Suggested-by: Benedikt Morbach <benedikt.morbach@googlemail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'kernel-tree-scripts/jerry-rig.sh')
-rwxr-xr-x | kernel-tree-scripts/jerry-rig.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel-tree-scripts/jerry-rig.sh b/kernel-tree-scripts/jerry-rig.sh index 3d4139a..fe309a5 100755 --- a/kernel-tree-scripts/jerry-rig.sh +++ b/kernel-tree-scripts/jerry-rig.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash K="$1" WG="$(readlink -f "$(dirname "$(readlink -f "$0")")/../../src/")" @@ -8,5 +8,6 @@ if [[ ! -e $K/net/Kconfig ]]; then exit 1 fi -sed -i "/^if INET\$/a source \"$WG/Kconfig\"" "$K/net/Kconfig" -echo "obj-y += ../../../../../../../../../../../../../../../../../../../../../..$WG/" >> "$K/net/Makefile" +ln -sfT "$WG" "$K/net/wireguard" +sed -i "/^obj-\\\$(CONFIG_NETFILTER).*+=/a obj-\$(CONFIG_WIREGUARD) += wireguard/" "$K/net/Makefile" +sed -i "/^if INET\$/a source \"net/wireguard/Kconfig\"" "$K/net/Kconfig" |