[tz] [PROPOSED 3/3] Avoid pwd in tzselect when developing

Paul Eggert eggert at cs.ucla.edu
Tue Jan 2 22:08:24 UTC 2024


* tzselect.ksh: Rewrite to not use the pwd command when developing,
except on ancient shells where PWD does not work.
This removes a dependency when developing on non-ancient platforms.
---
 tzselect.ksh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tzselect.ksh b/tzselect.ksh
index 8e66b30d..c56bc822 100644
--- a/tzselect.ksh
+++ b/tzselect.ksh
@@ -45,7 +45,8 @@ set -f
 
 # Specify default values for environment variables if they are unset.
 : ${AWK=awk}
-: ${TZDIR=`pwd`}
+: ${PWD=`pwd`}
+: ${TZDIR=$PWD}
 
 # Output one argument as-is to standard output, with trailing newline.
 # Safer than 'echo', which can mishandle '\' or leading '-'.
-- 
2.40.1




More information about the tz mailing list