commit: 58cca9b40298f5b2e0f45963488e1ed50a1d0048
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Jun 23 22:35:13 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 23 22:35:13 2024 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=58cca9b4
Have is_subset() permit the empty string as a sentinel
I can think of no compelling reason not to.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
functions.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/functions.sh b/functions.sh
index 55b6c3e..7e09611 100644
--- a/functions.sh
+++ b/functions.sh
@@ -176,15 +176,15 @@ is_anyof()
#
# Collects the intersection of the parameters up to - but not including - a
# sentinel value then determines whether the resulting set is a subset of the
-# intersection of the remaining parameters. If the SENTINEL variable is set and
-# non-empty, it shall be taken as the value of the sentinel. Otherwise, the
-# value of the sentinel shall be defined as <hyphen-dash><hyphen-dash>. If the
-# sentinel value is not encountered or if either set is empty then the return
-# value shall be greater than 1.
+# intersection of the remaining parameters. If the SENTINEL variable is set, it
+# shall be taken as the value of the sentinel. Otherwise, the value of the
+# sentinel shall be defined as <hyphen-dash><hyphen-dash>. If the sentinel
value
+# is not encountered or if either set is empty then the return value shall be
+# greater than 1.
#
is_subset()
{
- SENTINEL=${SENTINEL:-'--'} awk -f - -- "$@" <<-'EOF'
+ SENTINEL=${SENTINEL-'--'} awk -f - -- "$@" <<-'EOF'
BEGIN {
argc = ARGC
ARGC = 1