From 3560533c3fb0be8b6c17234156db297e4f2e1329 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Tue, 6 Nov 2018 16:23:03 +0100 Subject: Add check for config.previous, and use it if it exists --- PKGBUILD | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PKGBUILD b/PKGBUILD index 5e4373e..489c6bd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -108,7 +108,12 @@ prepare() { msg2 "Setting config..." - cp ../config.x86_64 .config + # we are in src/linux-x.yy.zz, looking for a config next to the pkgbuild + if [ -f ../../config.previous ]; then + cp ../../config.previous .config + else + cp ../config.x86_64 .config + fi ### Optionally disable NUMA for 64-bit kernels only # (x86 kernels do not support NUMA) @@ -132,6 +137,9 @@ prepare() { make -s kernelrelease > ../version msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)" + + # back up the config + cp .config ../../config.previous } build() { -- cgit v1.2.1