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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E0189158004 for ; Sat, 28 Oct 2023 01:59:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B5A262BC029; Sat, 28 Oct 2023 01:59:04 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8FC692BC029 for ; Sat, 28 Oct 2023 01:59:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7FEB2335C0D for ; Sat, 28 Oct 2023 01:59:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C729912B1 for ; Sat, 28 Oct 2023 01:59:01 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1698458332.bdf7f9e549314ffd69a8dfbe41f1d5ecd86cc99d.sam@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_moddeps.sh X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: bdf7f9e549314ffd69a8dfbe41f1d5ecd86cc99d X-VCS-Branch: master Date: Sat, 28 Oct 2023 01:59:01 +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: 56cf52f6-8283-43f0-9ea4-235e509b32fa X-Archives-Hash: aa47a9bdadee277f41b84ecb2cea950b commit: bdf7f9e549314ffd69a8dfbe41f1d5ecd86cc99d Author: Dmitry Baranov gmail com> AuthorDate: Sat Sep 9 10:20:20 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Oct 28 01:58:52 2023 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=bdf7f9e5 gen_moddeps.sh: don't use echo/printf inside the cycle Also prevent printing empty line if mydeps column is null. Signed-off-by: Dmitry Baranov gmail.com> Signed-off-by: Sam James gentoo.org> gen_moddeps.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gen_moddeps.sh b/gen_moddeps.sh index f175b72..6915746 100755 --- a/gen_moddeps.sh +++ b/gen_moddeps.sh @@ -18,7 +18,7 @@ gen_dep_list() { cat "${moddir}/modules.builtin" cat "${moddir}/modules.order" else - local -a modlist=() + local -a modlist=() moddeplist=() local mygroups for mygroups in ${!MODULES_*} GK_INITRAMFS_ADDITIONAL_KMODULES @@ -44,8 +44,7 @@ gen_dep_list() { local mydeps mymod while IFS=" " read -r -u 3 mymod mydeps do - echo ${mymod%:} - printf '%s\n' ${mydeps} + moddeplist+=( ${mymod%:} ${mydeps} ) done 3< <( local -a rxargs=( "${modlist[@]}" ) @@ -59,5 +58,7 @@ gen_dep_list() { cat "${moddir}/modules.dep" \ | grep -F "${rxargs[@]}" ) + + printf '%s\n' "${moddeplist[@]}" fi | xargs basename -s "${KEXT}" | sort | uniq }