index : releng | |
Archlinux32 release engineering | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-02-02 14:42:49 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-02 14:42:49 +0100 |
commit | b51ce612126c7193a34a52f80a124de51f06dc79 (patch) | |
tree | 7e9b533ece2c692cdb41c8243f1ab043c62704d6 | |
parent | 25b2d7dd8acdcc9356cf4179ab12c1f1c911a19c (diff) |
-rwxr-xr-x | update-kernel-config | 30 |
diff --git a/update-kernel-config b/update-kernel-config new file mode 100755 index 0000000..df52d67 --- /dev/null +++ b/update-kernel-config @@ -0,0 +1,30 @@ +#!/bin/bash + +if [ $# -ne 3 ]; then + >&2 echo 'usage: update-kernel-config [repository] [kernel-name] [old-git-revision]' + exit 2 +fi + +diff=$( + git -C "/usr/src/archlinux/packages/$2/repos/$1-x86_64" diff "$3" -- config | \ + grep '^[+-]' | \ + grep -v '^+++\|^---' +) + +{ + grep -vxF "$( + printf '%s\n' "${diff}" | \ + sed -n ' + s/^-// + T + p + ' + )" "/usr/src/github/archlinux32/packages/$1/$2/config-i686" + printf '%s\n' "${diff}" | \ + sed -n ' + s/^+// + T + p + ' +} | \ + sponge "/usr/src/github/archlinux32/packages/$1/$2/config-i686" |