diff options
author | Erich Eckner <git@eckner.net> | 2018-09-26 21:01:28 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-26 21:01:28 +0200 |
commit | 9d1c93efbb7af5e244fc59cf7690b6c5797b7bd7 (patch) | |
tree | c6430a1415b4bb67d3b94637f612fb4f6c686dfe /update-kernel-config | |
parent | f444661a1669261f8d910fad32546019485dda5c (diff) | |
download | devops-9d1c93efbb7af5e244fc59cf7690b6c5797b7bd7.tar.xz |
update-kernel-config: update config.i686 if available
Diffstat (limited to 'update-kernel-config')
-rwxr-xr-x | update-kernel-config | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/update-kernel-config b/update-kernel-config index 6ab46e8..6725334 100755 --- a/update-kernel-config +++ b/update-kernel-config @@ -19,6 +19,11 @@ if [ -z "${old_revision}" ]; then exit 1 fi +config_name=$( + ls -1 "/usr/src/archlinux32/packages/$1/$2" | \ + grep -m1 '^config\(\.i686\)\?$' +) + diff=$( git -C "/usr/src/archlinux/packages/$2/repos/$1-x86_64" diff "${old_revision}" HEAD -- config | \ grep '^[+-].' | \ @@ -38,7 +43,7 @@ fi T p ' - )" "/usr/src/archlinux32/packages/$1/$2/config" + )" "/usr/src/archlinux32/packages/$1/$2/${config_name}" printf '%s\n' "${diff}" | \ sed -n ' s/^+// @@ -46,7 +51,7 @@ fi p ' } | \ - sponge "/usr/src/archlinux32/packages/$1/$2/config" + sponge "/usr/src/archlinux32/packages/$1/$2/${config_name}" sed -i ' 1 s/^#.*$/# upstream git revision: '"$( @@ -64,7 +69,7 @@ sed -i ' awk '{print $1}' )"'/g s/'"$( - git -C "/usr/src/archlinux32/packages/$1/$2" archive HEAD -- config | \ + git -C "/usr/src/archlinux32/packages/$1/$2" archive HEAD -- "${config_name}" | \ tar -Ox | \ sha256sum | \ awk '{print $1}' |