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 C1DD2138359 for ; Tue, 20 Oct 2020 02:50:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D59A7E0845; Tue, 20 Oct 2020 02:50:21 +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 77ABEE0841 for ; Tue, 20 Oct 2020 02:50:21 +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 37C58340CCD for ; Tue, 20 Oct 2020 02:50:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9047D3BD for ; Tue, 20 Oct 2020 02:50:17 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1603162208.ad487bd196eb7bca1f6b0b6bf2e59151941a3111.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/pre-kmerge.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: ad487bd196eb7bca1f6b0b6bf2e59151941a3111 X-VCS-Branch: pending/mattst88 Date: Tue, 20 Oct 2020 02:50:17 +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: 125d4585-08a5-49b5-9bab-e63b21a94fe8 X-Archives-Hash: 08c976ca63ddb0e10f3c5f9bbe4c6fb8 commit: ad487bd196eb7bca1f6b0b6bf2e59151941a3111 Author: Matt Turner gentoo org> AuthorDate: Mon Oct 19 22:38:06 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Tue Oct 20 02:50:08 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ad487bd1 targets: Rewrite hppa pre-kmerge check Signed-off-by: Matt Turner gentoo.org> targets/support/pre-kmerge.sh | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh index dd51ae9a..165dfd51 100755 --- a/targets/support/pre-kmerge.sh +++ b/targets/support/pre-kmerge.sh @@ -2,32 +2,23 @@ source /tmp/chroot-functions.sh -case ${clst_hostarch} in - hppa) - got_32=0 - got_64=0 - for i in ${clst_boot_kernel} - do - if [ "${i: -2}" == "32" ] - then - if [ $got_32 -eq 1 ] - then - die "Only one 32 bit kernel can be configured" - fi - got_32=1 - elif [ "${i: -2}" == "64" ] - then - if [ $got_64 -eq 1 ] - then - die "Only one 64 bit kernel can be configured" - fi - got_64=1 - else - die "Kernel names must end by either 32 or 64" - fi - done - ;; -esac +if [[ ${clst_hostarch} == hppa ]]; then + for i in ${clst_boot_kernel}; do + case ${i} in + *32) + let num32++ + ;; + *64) + let num64++ + ;; + *) + die "Kernel names must end with either \"32\" or \"64\"" + ;; + esac + done + [[ $num32 > 1 ]] && die "Only one 32-bit kernel can be configured" + [[ $num64 > 1 ]] && die "Only one 64-bit kernel can be configured" +fi run_merge --oneshot genkernel install -d /tmp/kerncache