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 2B75D138359 for ; Wed, 21 Oct 2020 00:25:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7BD91E0AD3; Wed, 21 Oct 2020 00:25:02 +0000 (UTC) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) (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 269DAE0AD3 for ; Wed, 21 Oct 2020 00:25:02 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id 19so347047pge.12 for ; Tue, 20 Oct 2020 17:25:02 -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=+Zyh96hl5PTyzuoQSqt23CaO61JylPBBPVuoOV8POyc=; b=V86OdkL771NrSJGxZE4lkJ6CtGdgJK7e8jEWYOYNblOVTEQeP1Yf16vg5XWVYidEdz VUEQH3BXnrUQeMpEiZpSXK5EfxOotqbu5C6QR/kRNvLaEm9cMO9bmmW7eFkvoUKBxa3u Wfi99SzMNCAIHEvd6IWN4bwTK2Upa6z2ddSTnDML/o78nZBxn0hXSH22HePaOQeTnWeT AIHSf/iJIEWam6VdEY5kGJ0/vyih3btFID6BhTNZIJXjU4FdCGfxQy0Qco1fnWKqREdu vgiREir6SWvopjgjFTmZZRRLFggV+upq5G4P2yjVu6L20TGwG1PoS8Sp7NUjh+UWp1ZY kRRw== X-Gm-Message-State: AOAM5331mlX9TO0JxeUg0RGQM7wMwV8jqbec5hwLyiWxrUcw0O94jjwD Gmmi+oY44XnTQUZaE9CS05Yc4tRN6ONZqQ== X-Google-Smtp-Source: ABdhPJyG+uqwKotGoEzs44JsPvZaA+aOE5b2aR2DLcmXaXvwXdOo+BQS5CFGrVVZtRf9r0mOIWGbnw== X-Received: by 2002:a63:1a09:: with SMTP id a9mr769542pga.188.1603239900836; Tue, 20 Oct 2020 17:25:00 -0700 (PDT) Received: from localhost ([108.161.26.224]) by smtp.gmail.com with ESMTPSA id b3sm175905pfd.66.2020.10.20.17.24.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 17:25:00 -0700 (PDT) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 37/37] targets: Use double-brackets in kmerge.sh Date: Tue, 20 Oct 2020 17:23:44 -0700 Message-Id: <20201021002344.378131-37-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: 6dea2091-032c-4249-b36e-1eff2b9f6828 X-Archives-Hash: 7bb314ac78474cf3af08a2530902511d Signed-off-by: Matt Turner --- targets/support/kmerge.sh | 50 ++++++++++++--------------------------- 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh index 5e284183..fb67aba6 100755 --- a/targets/support/kmerge.sh +++ b/targets/support/kmerge.sh @@ -15,71 +15,51 @@ genkernel_compile() { --minkernpackage=/tmp/kerncache/${kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 all ) # extra genkernel options that we have to test for - if [ -n "${clst_gk_mainargs}" ] - then + if [[ -n ${clst_gk_mainargs} ]]; then GK_ARGS+=(${clst_gk_mainargs}) fi - if [ -n "${clst_KERNCACHE}" ] - then + if [[ -n ${clst_KERNCACHE} ]]; then GK_ARGS+=(--kerncache=/tmp/kerncache/${kname}-kerncache-${clst_version_stamp}.tar.bz2) fi - if [ -e /var/tmp/${kname}.config ] - then + if [[ -e /var/tmp/${kname}.config ]]; then GK_ARGS+=(--kernel-config=/var/tmp/${kname}.config) fi - - if [ -d "/tmp/initramfs_overlay/${initramfs_overlay}" ] - then + if [[ -d /tmp/initramfs_overlay/${initramfs_overlay} ]]; then GK_ARGS+=(--initramfs-overlay=/tmp/initramfs_overlay/${initramfs_overlay}) fi - if [ -n "${clst_CCACHE}" ] - then + if [[ -n ${clst_CCACHE} ]]; then GK_ARGS+=(--kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc) fi - - if [ -n "${clst_linuxrc}" ] - then + if [[ -n ${clst_linuxrc} ]]; then GK_ARGS+=(--linuxrc=/tmp/linuxrc) fi - - if [ -n "${clst_busybox_config}" ] - then + if [[ -n ${clst_busybox_config} ]]; then GK_ARGS+=(--busybox-config=/tmp/busy-config) fi - - if [ "${clst_target}" == "netboot" ] - then + if [[ ${clst_target} == netboot ]]; then GK_ARGS+=(--netboot) - if [ -n "${clst_merge_path}" ] - then + if [[ -n ${clst_merge_path} ]]; then GK_ARGS+=(--initramfs-overlay="${clst_merge_path}") fi fi - - if [ -n "${clst_VERBOSE}" ] - then + if [[ -n ${clst_VERBOSE} ]]; then GK_ARGS+=(--loglevel=2) fi - # Build with genkernel using the set options - # callback is put here to avoid escaping issues - if [ -n "${clst_VERBOSE}" ] - then + if [[ -n ${clst_VERBOSE} ]]; then gk_callback_opts=(-vN) else gk_callback_opts=(-qN) fi - if [ -n "${clst_KERNCACHE}" ] - then + if [[ -n ${clst_KERNCACHE} ]]; then gk_callback_opts+=(-kb) fi - if [ -n "${clst_FETCH}" ] - then + if [[ -n ${clst_FETCH} ]]; then gk_callback_opts+=(-f) fi - if [ "${kernel_merge}" != "" ] - then + + if [[ -n ${kernel_merge} ]]; then genkernel --callback="emerge ${gk_callback_opts[@]} ${kernel_merge}" \ "${GK_ARGS[@]}" || exit 1 else -- 2.26.2