index : releng | |
Archlinux32 release engineering | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-07-10 08:20:10 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-07-10 08:20:10 +0200 |
commit | 3da6360c92ae865358398ae53220086bc8d54c7c (patch) | |
tree | af0420f03257d08c1a0712e4cbe4c1a55b1ceb98 /update-kernel-config | |
parent | 1ebb0dbae09cebf9a535ac057e3d2b20817d1cbb (diff) |
-rwxr-xr-x | update-kernel-config | 72 |
diff --git a/update-kernel-config b/update-kernel-config deleted file mode 100755 index 37e414c..0000000 --- a/update-kernel-config +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -if [ $# -ne 2 ]; then - >&2 echo 'usage: update-kernel-config [repository] [kernel-name]' - exit 2 -fi - -old_revision=$( - sed -n ' - s/^# upstream git\( revision\)\?: *// - T - p - ' "/usr/src/archlinux32/packages/$1/$2/PKGBUILD" -) - -if [ -z "${old_revision}" ]; then - >&2 echo 'Cannot detemine old upstream git revision.' - >&2 echo '"# upstream git revision: ..." line is missing.' - exit 1 -fi - -diff=$( - git -C "/usr/src/archlinux/packages/$2/repos/$1-x86_64" diff "${old_revision}" HEAD -- config | \ - grep '^[+-].' | \ - grep -v '^+++\|^---' -) - -if [ -z "${diff}" ]; then - >&2 echo 'nothing changed.' - exit 1 -fi - -{ - grep -vxF "$( - printf '%s\n' "${diff}" | \ - sed -n ' - s/^-// - T - p - ' - )" "/usr/src/archlinux32/packages/$1/$2/config" - printf '%s\n' "${diff}" | \ - sed -n ' - s/^+// - T - p - ' -} | \ - sponge "/usr/src/archlinux32/packages/$1/$2/config" - -sed -i ' - 1 s/^#.*$/# upstream git revision: '"$( - git -C "/usr/src/archlinux/packages" rev-parse HEAD - )"'/ - s/'"$( - git -C "/usr/src/archlinux/packages/$2/repos/$1-x86_64" archive "${old_revision}" -- config | \ - tar -Ox | \ - sha256sum | \ - awk '{print $1}' - )"'/'"$( - git -C "/usr/src/archlinux/packages/$2/repos/$1-x86_64" archive HEAD -- config | \ - tar -Ox | \ - sha256sum | \ - awk '{print $1}' - )"'/g - s/'"$( - git -C "/usr/src/archlinux32/packages/$1/$2" archive HEAD -- config | \ - tar -Ox | \ - sha256sum | \ - awk '{print $1}' - )"'/SKIP/g -' "/usr/src/archlinux32/packages/$1/$2/PKGBUILD" |