kernel-config-checker: add support for gzipped config
If the config file exists but as a gz file only we need to create a
tempfile that we can parse for fragments.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
diff --git a/automated/linux/kernel-config-checker/kernel-config-checker.sh b/automated/linux/kernel-config-checker/kernel-config-checker.sh
index 27f0ac9..f955dcd 100755
--- a/automated/linux/kernel-config-checker/kernel-config-checker.sh
+++ b/automated/linux/kernel-config-checker/kernel-config-checker.sh
@@ -54,6 +54,10 @@
kernel_config="/lib/modules/$(uname -r)/config"
elif [ -e "/lib/kernel/config-$(uname -r)" ]; then
kernel_config="/lib/kernel/config-$(uname -r)"
+ elif [ -e "/proc/config.gz" ]; then
+ tmpfile=$(mktemp /tmp/config.XXXXX)
+ zcat /proc/config.gz > "${tmpfile}"
+ kernel_config=${tmpfile}
fi
}