diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-26 18:21:30 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-26 18:21:30 +0200 |
commit | 1e51b25dc650f363f1bd284666441d968f0e3e08 (patch) | |
tree | 5ab04011df2670cc3e5270d34a5ac3fd4e06e52b /gen_package.sh | |
parent | gen_funcs.sh: Add is_gzipped() function (diff) | |
download | genkernel-1e51b25dc650f363f1bd284666441d968f0e3e08.tar.gz genkernel-1e51b25dc650f363f1bd284666441d968f0e3e08.tar.bz2 genkernel-1e51b25dc650f363f1bd284666441d968f0e3e08.zip |
Make use of new is_gzipped() function
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_package.sh')
-rwxr-xr-x | gen_package.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gen_package.sh b/gen_package.sh index ca46a2c..665f101 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -123,7 +123,8 @@ gen_kerncache() { cp -aL "${KERNEL_OUTPUTDIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}" \ || gen_die "Could not copy the kernel config '${KERNEL_OUTPUTDIR}/.config' for the kernel package!" - if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then + if isTrue "$(is_gzipped "${KERNEL_CONFIG}")" + then # Support --kernel-config=/proc/config.gz, mainly zcat "${KERNEL_CONFIG}" > "${TEMP}/kerncache/config-${ARCH}-${KV}.orig" \ || gen_die "Could not copy the kernel config '${KERNEL_CONFIG}' for the kernel package!" @@ -250,7 +251,8 @@ gen_kerncache_is_valid() { local test1=$(grep -v "^#" "${TEMP}/config-${ARCH}-${KV}" | md5sum | cut -d " " -f 1) fi - if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then + if isTrue "$(is_gzipped "${KERNEL_CONFIG}")" + then # Support --kernel-config=/proc/config.gz, mainly local CONFGREP=zgrep else |