blob: 79bd704153e2247f576eb3c24a00c5da993cbc77 [file] [log] [blame]
Andrew Geisslerd1e89492021-02-12 15:35:20 -06001From 3feb4213628f1485000ffe1d3fd26e37a7b14336 Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:33:03 +0000
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004Subject: [PATCH] timezone: re-written tzselect as posix sh
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
6To avoid the bash dependency.
7
8Upstream-Status: Pending
9
10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 timezone/Makefile | 2 +-
14 timezone/tzselect.ksh | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/timezone/Makefile b/timezone/Makefile
Andrew Geisslerd1e89492021-02-12 15:35:20 -060018index 395abfeebd..2d939edf75 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050019--- a/timezone/Makefile
20+++ b/timezone/Makefile
Andrew Geisslerd1e89492021-02-12 15:35:20 -060021@@ -123,7 +123,7 @@ $(testdata)/XT%: testdata/XT%
Andrew Geissler82c905d2020-04-13 13:39:40 -050022 cp $< $@
23
24 $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
25- sed -e 's|/bin/bash|$(BASH)|' \
26+ sed -e 's|/bin/bash|/bin/sh|' \
27 -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
28 -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
29 -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
30diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
31index 18fce27e24..70745f9d36 100755
32--- a/timezone/tzselect.ksh
33+++ b/timezone/tzselect.ksh
34@@ -34,7 +34,7 @@ REPORT_BUGS_TO=tz@iana.org
35
36 # Specify default values for environment variables if they are unset.
37 : ${AWK=awk}
38-: ${TZDIR=`pwd`}
39+: ${TZDIR=$(pwd)}
40
41 # Output one argument as-is to standard output.
42 # Safer than 'echo', which can mishandle '\' or leading '-'.