[tz] [PROPOSED 10/12] Use ‘export VAR=VAL’ syntax
Paul Eggert
eggert at cs.ucla.edu
Sat Jun 1 18:33:55 UTC 2024
This is OK now that we assume POSIX.2-1992.
* Makefile (SETUP_TAR, UTF8_LOCALE_MISSING):
* tzselect.ksh (line):
* workman.sh (GROFF_NO_SGR):
Use ‘export VAR=VAL’ instead of ‘VAR=VAL; export VAR’.
---
Makefile | 4 ++--
tzselect.ksh | 2 +-
workman.sh | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 0ca3edda..8eefce0c 100644
--- a/Makefile
+++ b/Makefile
@@ -543,7 +543,7 @@ GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \
--numeric-owner --owner=0 --group=0 \
--mode=go+u,go-w --sort=name
SETUP_TAR= \
- LC_ALL=C && export LC_ALL && \
+ export LC_ALL=C && \
if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \
TAR='tar $(GNUTARFLAGS)'; \
else \
@@ -874,7 +874,7 @@ UTF8_LOCALE_MISSING = \
{ test ! '$(UTF8_LOCALE)' \
|| ! printf 'A\304\200B\n' \
| LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 \
- || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; }
+ || { export LC_ALL='$(UTF8_LOCALE)'; false; }; }
character-set.ck: $(ENCHILADA)
$(UTF8_LOCALE_MISSING) || { \
diff --git a/tzselect.ksh b/tzselect.ksh
index 811645c2..48159afd 100644
--- a/tzselect.ksh
+++ b/tzselect.ksh
@@ -785,7 +785,7 @@ done
case $SHELL in
*csh) file=.login line="setenv TZ '$tz'";;
-*) file=.profile line="TZ='$tz'; export TZ"
+*) file=.profile line="export TZ='$tz'"
esac
test -t 1 && say >&2 "
diff --git a/workman.sh b/workman.sh
index 6e2da3a8..29f317cb 100644
--- a/workman.sh
+++ b/workman.sh
@@ -7,8 +7,7 @@
if (type nroff && type perl) >/dev/null 2>&1; then
# Tell groff not to emit SGR escape sequences (ANSI color escapes).
- GROFF_NO_SGR=1
- export GROFF_NO_SGR
+ export GROFF_NO_SGR=1
echo ".am TH
.hy 0
--
2.45.1
More information about the tz
mailing list