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 50014138359 for ; Tue, 20 Oct 2020 19:59:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A327EE0AB7; Tue, 20 Oct 2020 19:59:11 +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 8C70DE0AB6 for ; Tue, 20 Oct 2020 19:59:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 912AA340B54 for ; Tue, 20 Oct 2020 19:59:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 475D73A1 for ; Tue, 20 Oct 2020 19:59:09 +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: <1603223938.bc5afc7b6147b562a5de694476f387cb10c1e846.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:pending/mattst88 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: bc5afc7b6147b562a5de694476f387cb10c1e846 X-VCS-Branch: pending/mattst88 Date: Tue, 20 Oct 2020 19:59:09 +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: 564458b4-4d7a-4cdb-8e38-e148244afc48 X-Archives-Hash: 7023f437698e3521afd34e8f97be35e2 commit: bc5afc7b6147b562a5de694476f387cb10c1e846 Author: Matt Turner gentoo org> AuthorDate: Tue Oct 20 02:48:07 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Tue Oct 20 19:58:58 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bc5afc7b targets: Use double-brackets in kmerge.sh Signed-off-by: Matt Turner 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 b6841fe5..584655d6 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