commit: 83a380418dd6b669e633074def33edc370978b01
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Thu May 16 02:15:15 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 16 02:34:10 2024 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=83a38041
Remove some superfluous boolean variable declarations
Remove the superfluous declarations of EINFO_QUIET, EINFO_VERBOSE,
RC_NOCOLOR and genfun_indent. No attempt has been made to appease the
nounset cultists because it was already the case that gentoo-functions
be incompatible with it. Should push come to shove, nounset could be
accommodated but such a requirement ought then to be attended to in its
own right.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
functions.sh | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/functions.sh b/functions.sh
index 6647c67..dfbbe31 100644
--- a/functions.sh
+++ b/functions.sh
@@ -488,14 +488,7 @@ _update_tty_level()
# This is the main script, please add all functions above this point!
# shellcheck disable=2034
-RC_GOT_FUNCTIONS="yes"
-
-# Dont output to stdout?
-EINFO_QUIET="${EINFO_QUIET:-no}"
-EINFO_VERBOSE="${EINFO_VERBOSE:-no}"
-
-# Set the initial value for e-message indentation.
-genfun_indent=
+RC_GOT_FUNCTIONS=yes
# Assign the LF ('\n') character for later expansion. POSIX Issue 8 permits
# $'\n' but it may take years for it to be commonly implemented.
@@ -513,13 +506,12 @@ fi
# Should we use color?
if [ -n "${NO_COLOR}" ]; then
# See https://no-color.org/.
- RC_NOCOLOR="yes"
+ RC_NOCOLOR=yes
else
- RC_NOCOLOR="${RC_NOCOLOR:-no}"
for _ in "$@"; do
case $_ in
--nocolor|--nocolour|-C)
- RC_NOCOLOR="yes"
+ RC_NOCOLOR=yes
break
esac
done