From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1216744-garchives=archives.gentoo.org@lists.gentoo.org>
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 68C2813835A
	for <garchives@archives.gentoo.org>; Wed, 21 Oct 2020 17:58:56 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5EE11E099B;
	Wed, 21 Oct 2020 17:58:53 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(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 1855DE0998
	for <gentoo-commits@lists.gentoo.org>; Wed, 21 Oct 2020 17:58:53 +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 4F055340D82
	for <gentoo-commits@lists.gentoo.org>; Wed, 21 Oct 2020 17:58:52 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id E08143C7
	for <gentoo-commits@lists.gentoo.org>; Wed, 21 Oct 2020 17:58:48 +0000 (UTC)
From: "Matt Turner" <mattst88@gentoo.org>
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" <mattst88@gentoo.org>
Message-ID: <1603236395.e96ef61854ae6f85f90dc9f5e01b5e1743c8a6f6.mattst88@gentoo>
Subject: [gentoo-commits] proj/catalyst:master commit in: targets/support/
X-VCS-Repository: proj/catalyst
X-VCS-Files: targets/support/kmerge.sh
X-VCS-Directories: targets/support/
X-VCS-Committer: mattst88
X-VCS-Committer-Name: Matt Turner
X-VCS-Revision: e96ef61854ae6f85f90dc9f5e01b5e1743c8a6f6
X-VCS-Branch: master
Date: Wed, 21 Oct 2020 17:58:48 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: ffc4c5ca-88c8-483e-90f2-b05e00deaee7
X-Archives-Hash: 511c04b8c7c32db5ae83c07276c67e23
Message-ID: <20201021175848.MbWSs8Md5gzR1CuabmlW8rI1P8V568ZzQTUg50UvrOg@z>

commit:     e96ef61854ae6f85f90dc9f5e01b5e1743c8a6f6
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:48:07 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:26:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e96ef618

targets: Use double-brackets in kmerge.sh

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 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