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 1F256138359 for ; Wed, 21 Oct 2020 00:24:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 646E8E0AAD; Wed, 21 Oct 2020 00:24:39 +0000 (UTC) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) (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 5E023E0AAD for ; Wed, 21 Oct 2020 00:24:39 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id o9so276112plx.10 for ; Tue, 20 Oct 2020 17:24:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uLSGZ26p/RZbCjXr04b3JatJ4VTsniA81rzEZZW9+1g=; b=grDbS3W56r4euv5DwmCOqEJCp9SXyAhPuxyjSyiWqNxnxP8ftgFVMCboIDauVdRBBe 9UUa2xlDFRDjna1REbn2flcZLQNsWEVfFjpLk1QfBU8zIkC81aoHszX3ID+8xLI+Dlxt jfN6vDJ926w0oavcCZifG9JMqx8+uJJ8st7R3qipA+heNBmWoQmJuPa4qDDqwMWhRN2D Nv27TAAjvUcCQHAhGmjvJ5Mhk79jFFNnyzbBfGiIt0ialWoaxM4NP+RCYqX65t6OaWOY 3aLHQgSMkcNoTVe4NUDpLGyXjWpkUVG7hJJsQ3Omft+XFMD6bcgwDFUU+kjVu7Ik305l 1qkA== X-Gm-Message-State: AOAM531crf2PtmvHQl/a3QIzBLjVzhx/2UUfHo1AvwPTq+g6hJz9pFLx GbPrOAMZc+b4qx8skF9KwpauGJKmNr3O/w== X-Google-Smtp-Source: ABdhPJxhW1j4n6Ol9MZAgH7b9I8Ooy1UNQhx1eRLnPkNsPhnBQkeHE53UbbtG9+EgZnvayu1rf08xw== X-Received: by 2002:a17:902:c410:b029:d3:d4ae:87fb with SMTP id k16-20020a170902c410b02900d3d4ae87fbmr768931plk.81.1603239878165; Tue, 20 Oct 2020 17:24:38 -0700 (PDT) Received: from localhost ([108.161.26.224]) by smtp.gmail.com with ESMTPSA id n203sm184025pfd.81.2020.10.20.17.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 17:24:37 -0700 (PDT) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 24/37] targets: Rewrite hppa pre-kmerge check Date: Tue, 20 Oct 2020 17:23:31 -0700 Message-Id: <20201021002344.378131-24-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201021002344.378131-1-mattst88@gentoo.org> References: <20201021002344.378131-1-mattst88@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 8084c208-aca7-4fed-963e-7abdd8275550 X-Archives-Hash: 61bfc8e28070799fec3ba77e1d08fac4 Signed-off-by: Matt Turner --- 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 -- 2.26.2