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 BB60215817D for ; Fri, 21 Jun 2024 13:14:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9A895E2A45; Fri, 21 Jun 2024 13:14:17 +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 316C2E2A45 for ; Fri, 21 Jun 2024 13:14:17 +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 2FE1C33BF28 for ; Fri, 21 Jun 2024 13:14:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6639A1D4C for ; Fri, 21 Jun 2024 13:14:14 +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: <1718086319.755177bbfcf4c46ad1ac31ad9501a6c8725b1a68.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: 755177bbfcf4c46ad1ac31ad9501a6c8725b1a68 X-VCS-Branch: master Date: Fri, 21 Jun 2024 13:14:14 +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: 3babb07d-8621-4e61-b1f8-1bef7aca8f5f X-Archives-Hash: 56973bb356ef4b7840063c3e73fff56c commit: 755177bbfcf4c46ad1ac31ad9501a6c8725b1a68 Author: Kerin Millar plushkava net> AuthorDate: Sun Jun 2 03:36:27 2024 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jun 11 06:11:59 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=755177bb Add the warn() function This will be used internally by a forthcoming commit. Signed-off-by: Kerin Millar plushkava.net> functions.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions.sh b/functions.sh index 9736747..a97dde7 100644 --- a/functions.sh +++ b/functions.sh @@ -473,6 +473,14 @@ vewend() fi } +# +# Prints a diagnostic message prefixed with the basename of the running script. +# +warn() +{ + printf '%s: %s\n' "${0##*/}" "$*" >&2 +} + # # Determines whether the first parameter is truthy. The values taken to be true # are "yes", "true", "on" and "1", whereas their opposites are taken to be