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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C07F715800F for ; Mon, 13 Feb 2023 21:37:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 85DDEE07E2; Mon, 13 Feb 2023 21:37:27 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6E71FE07E2 for ; Mon, 13 Feb 2023 21:37:27 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 99B71340BB9 for ; Mon, 13 Feb 2023 21:37:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 569EB8AB for ; Mon, 13 Feb 2023 21:37:24 +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: <1676266180.df52bb0f4b48f3abd935709770a66107a38196d8.sam@gentoo> Subject: [gentoo-commits] proj/gentoo-functions:master commit in: / X-VCS-Repository: proj/gentoo-functions X-VCS-Files: functions.sh X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: df52bb0f4b48f3abd935709770a66107a38196d8 X-VCS-Branch: master Date: Mon, 13 Feb 2023 21:37:24 +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: fc5253db-3e8d-4a16-9e5c-023135bdee94 X-Archives-Hash: d6bad8d0637a9d008377aa196a11171c commit: df52bb0f4b48f3abd935709770a66107a38196d8 Author: Kerin Millar plushkava net> AuthorDate: Mon Feb 13 02:12:17 2023 +0000 Commit: Sam James gentoo org> CommitDate: Mon Feb 13 05:29:40 2023 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=df52bb0f Alleviate and/or mute some ineffectual shellcheck warnings Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> functions.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions.sh b/functions.sh index aa3d1d9..9bae772 100644 --- a/functions.sh +++ b/functions.sh @@ -7,6 +7,7 @@ # not use bashisms. # +# shellcheck disable=2034 RC_GOT_FUNCTIONS="yes" # @@ -407,7 +408,7 @@ is_older_than() find "$@" fi } | - read -r line + read -r _ } # @@ -465,6 +466,7 @@ for arg in "$@" ; do done # Define COLS and ENDCOL so that eend can line up the [ ok ]. +# shellcheck disable=3044 if [ -n "${BASH}" ] && shopt -s checkwinsize 2>/dev/null; then # As is documented, running an external command will cause bash to set # the COLUMNS variable. This technique is effective for >=4.3, though @@ -480,8 +482,8 @@ else # size operand is not portable. COLS=$( stty size 2>/dev/null | { - if read -r h w _; then - printf '%s\n' "$w" + if read -r _ cols _; then + printf '%s\n' "${cols}" fi } )