commit: 798f1a11ab87b7ce323478effbf4ed70410f4ec5 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> AuthorDate: Thu Mar 4 15:50:08 2021 +0000 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> CommitDate: Thu Mar 4 15:50:08 2021 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=798f1a11
Script to get wireguard patch. Thanks to zx2c4. Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> scripts/gpwireguard | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/scripts/gpwireguard b/scripts/gpwireguard new file mode 100755 index 0000000..1df97af --- /dev/null +++ b/scripts/gpwireguard @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +dst="$(readlink -f "wireguard-backport-5.4.y.patch")" +temp="$(mktemp -d)" +trap 'cd /; rm -rf "$temp";' INT TERM EXIT +cd "$temp" +echo "[+] Fetching patch for 5.4.y" +curl -# -f -L -o git-patches.mbox "https://git.zx2c4.com/wireguard-linux/patch/?id2=gregkh/stable-5.4.y&id=backport-5.4.y" +echo "[+] Normalizing patch" +splitdiff -a -p 1 git-patches.mbox +l=/dev/null +for patch in *.patch; do + combinediff -q -p 1 "$l" "$patch" > next.patch + l=last.patch + mv next.patch last.patch +done +mv last.patch "$dst" +echo "[+] Result is in $dst"
