From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1FFE8138334 for ; Fri, 26 Jul 2019 16:31:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E4761E0823; Fri, 26 Jul 2019 16:31:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9FB86E0824 for ; Fri, 26 Jul 2019 16:31:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2A40B348C1A for ; Fri, 26 Jul 2019 16:31:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A854B734 for ; Fri, 26 Jul 2019 16:31:28 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1564158090.1e51b25dc650f363f1bd284666441d968f0e3e08.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_configkernel.sh gen_initramfs.sh gen_package.sh genkernel X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 1e51b25dc650f363f1bd284666441d968f0e3e08 X-VCS-Branch: master Date: Fri, 26 Jul 2019 16:31:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 31aa4159-d1ae-4b15-bbd8-6a063b62e4c5 X-Archives-Hash: f7a7bcd44a6a2bd2df0566e27d5bd97f commit: 1e51b25dc650f363f1bd284666441d968f0e3e08 Author: Thomas Deutschmann gentoo org> AuthorDate: Fri Jul 26 16:21:30 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Fri Jul 26 16:21:30 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=1e51b25d Make use of new is_gzipped() function Signed-off-by: Thomas Deutschmann gentoo.org> gen_configkernel.sh | 2 +- gen_initramfs.sh | 2 +- gen_package.sh | 6 ++++-- genkernel | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gen_configkernel.sh b/gen_configkernel.sh index 9a4812f..9a33717 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -132,7 +132,7 @@ config_kernel() { print_info 3 "$(get_indent 1)>> Copying '${KERNEL_CONFIG}' to '${KERNEL_OUTPUTDIR}/.config' ..." local message="Failed to copy kernel config file '${KERNEL_CONFIG}' to '${KERNEL_OUTPUTDIR}/.config'!" - if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}" 2>/dev/null)" == application/x-gzip ]] + if isTrue "$(is_gzipped "${KERNEL_CONFIG}")" then # Support --kernel-config=/proc/config.gz, mainly zcat "${KERNEL_CONFIG}" > "${KERNEL_OUTPUTDIR}/.config" || gen_die "${message}" diff --git a/gen_initramfs.sh b/gen_initramfs.sh index eb3aed7..9a06855 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -1629,7 +1629,7 @@ create_initramfs() { local ACTUAL_KERNEL_CONFIG="${KERNEL_CONFIG}" fi - if [[ "$(file --brief --mime-type "${ACTUAL_KERNEL_CONFIG}")" == application/x-gzip ]] + if isTrue "$(is_gzipped "${ACTUAL_KERNEL_CONFIG}")" then # Support --kernel-config=/proc/config.gz, mainly local CONFGREP=zgrep 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 diff --git a/genkernel b/genkernel index 0368acd..9625353 100755 --- a/genkernel +++ b/genkernel @@ -442,7 +442,7 @@ then print_warning 1 '"man genkernel" explains "dozfs" in detail.' fi - if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]] + if isTrue "$(is_gzipped "${KERNEL_CONFIG}")" then # Support --kernel-config=/proc/config.gz, mainly CONFGREP=zgrep