summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xemacs-updater6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2dc5440..6323e0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-05-02 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs-updater (COLOUR): Respect the NO_COLOR environment
+ variable.
+
2024-05-01 Arsen Arsenović <arsen@gentoo.org>
* emacs-updater (pm_portage): Pass --usepkg=n to Portage.
diff --git a/emacs-updater b/emacs-updater
index c1ac43e..34fd89b 100755
--- a/emacs-updater
+++ b/emacs-updater
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2007-2023 Gentoo Authors
+# Copyright 2007-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
# Authors:
@@ -20,12 +20,14 @@ PM_EXTRAOPTS=( )
# Other default variable settings
BATCH=
-COLOUR=
EXACT=
MAJOR=
ORPHANS=
PRETEND=
+# Check for NO_COLOR environment variable: https://no-color.org/
+COLOUR=${NO_COLOR:+no}
+
usage() {
sed -e 's/^X//' <<-EOF
Usage: ${0##*/} [OPTION]...