diff --git a/NEWS b/NEWS index 89fbd86..0e64291 100644 --- a/NEWS +++ b/NEWS @@ -11,8 +11,9 @@ Unreleased, experimental changes Changes affecting API The 'tzselect' command no longer requires the 'select' command, - and should now work with /bin/sh on more platforms. (Thanks to - Patrick 'P. J.' McDermott for reporting the problem.) + and should now work with /bin/sh on more platforms. It also works + around a bug in BusyBox awk before version 1.21.0. (Thanks to + Patrick 'P. J.' McDermott.) Changes affecting the build procedure diff --git a/tzselect.ksh b/tzselect.ksh index 7f789bd..47c67bd 100644 --- a/tzselect.ksh +++ b/tzselect.ksh @@ -259,7 +259,8 @@ while echo >&2 'Please select a continent, ocean, "coord", or "TZ".' quoted_continents=` - $AWK -F'\t' ' + $AWK ' + BEGIN { FS = "\t" } /^[^#]/ { entry = substr($3, 1, index($3, "/") - 1) if (entry == "America") @@ -347,10 +348,11 @@ while ;; *) # Get list of names of countries in the continent or ocean. - countries=`$AWK -F'\t' \ + countries=`$AWK \ -v continent="$continent" \ -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ ' + BEGIN { FS = "\t" } /^#/ { next } $3 ~ ("^" continent "/") { if (!cc_seen[$1]++) cc_list[++ccs] = $1 @@ -383,11 +385,12 @@ while # Get list of names of time zone rule regions in the country. - regions=`$AWK -F'\t' \ + regions=`$AWK \ -v country="$country" \ -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ ' BEGIN { + FS = "\t" cc = country while (getline