From d437d3f03e7b2788f7efbe6c8cac16fd2f1cb315 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 2 Oct 2018 14:12:30 +0200 Subject: update-kernel-config: update all configs at least roughly (and makeolddefconfig the i686 one) --- update-kernel-config | 51 +++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 22 deletions(-) (limited to 'update-kernel-config') diff --git a/update-kernel-config b/update-kernel-config index 6725334..3fed852 100755 --- a/update-kernel-config +++ b/update-kernel-config @@ -19,9 +19,10 @@ if [ -z "${old_revision}" ]; then exit 1 fi -config_name=$( - ls -1 "/usr/src/archlinux32/packages/$1/$2" | \ - grep -m1 '^config\(\.i686\)\?$' +config_names=$( + git -C "/usr/src/archlinux32/packages/$1/$2" archive HEAD -- | \ + tar -t | \ + grep '^config\($\|\.\)' ) diff=$( @@ -35,23 +36,25 @@ if [ -z "${diff}" ]; then exit 1 fi -{ - grep -vxF "$( +for config_name in ${config_names}; do + { + grep -vxF "$( + printf '%s\n' "${diff}" | \ + sed -n ' + s/^-// + T + p + ' + )" "/usr/src/archlinux32/packages/$1/$2/${config_name}" printf '%s\n' "${diff}" | \ sed -n ' - s/^-// + s/^+// T p ' - )" "/usr/src/archlinux32/packages/$1/$2/${config_name}" - printf '%s\n' "${diff}" | \ - sed -n ' - s/^+// - T - p - ' -} | \ - sponge "/usr/src/archlinux32/packages/$1/$2/${config_name}" + } | \ + sponge "/usr/src/archlinux32/packages/$1/$2/${config_name}" +done sed -i ' 1 s/^#.*$/# upstream git revision: '"$( @@ -68,10 +71,14 @@ sed -i ' sha256sum | \ awk '{print $1}' )"'/g - s/'"$( - git -C "/usr/src/archlinux32/packages/$1/$2" archive HEAD -- "${config_name}" | \ - tar -Ox | \ - sha256sum | \ - awk '{print $1}' - )"'/SKIP/g -' "/usr/src/archlinux32/packages/$1/$2/PKGBUILD" + '"$( + for config_name in ${config_names}; do + printf 's/' + git -C "/usr/src/archlinux32/packages/$1/$2" archive HEAD -- "${config_name}" | \ + tar -Ox | \ + sha256sum | \ + awk '{print $1}' | \ + tr -d '\n' + printf '/SKIP/g\n' + done + )" "/usr/src/archlinux32/packages/$1/$2/PKGBUILD" -- cgit v1.2.3-70-g09d2