summaryrefslogtreecommitdiff
path: root/update-kernel-config
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-26 21:01:28 +0200
committerErich Eckner <git@eckner.net>2018-09-26 21:01:28 +0200
commit9d1c93efbb7af5e244fc59cf7690b6c5797b7bd7 (patch)
treec6430a1415b4bb67d3b94637f612fb4f6c686dfe /update-kernel-config
parentf444661a1669261f8d910fad32546019485dda5c (diff)
downloaddevops-9d1c93efbb7af5e244fc59cf7690b6c5797b7bd7.tar.xz
update-kernel-config: update config.i686 if available
Diffstat (limited to 'update-kernel-config')
-rwxr-xr-xupdate-kernel-config11
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}'