summaryrefslogtreecommitdiff
path: root/update-kernel-config
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-02 14:12:30 +0200
committerErich Eckner <git@eckner.net>2018-10-02 14:12:30 +0200
commitd437d3f03e7b2788f7efbe6c8cac16fd2f1cb315 (patch)
tree24af072d4663de9fcd9b6a31e545f39a40c0b4a0 /update-kernel-config
parent9d1c93efbb7af5e244fc59cf7690b6c5797b7bd7 (diff)
downloaddevops-d437d3f03e7b2788f7efbe6c8cac16fd2f1cb315.tar.xz
update-kernel-config: update all configs at least roughly (and makeolddefconfig the i686 one)
Diffstat (limited to 'update-kernel-config')
-rwxr-xr-xupdate-kernel-config51
1 files changed, 29 insertions, 22 deletions
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"