void-packages/srcpkgs/tzutils/patches/reexec-with-bash.patch
Đoàn Trần Công Danh fd5611e636 tzutils: update to 2021b.
2021-10-01 16:46:38 +07:00

17 lines
619 B
Diff

Avoid dependencies to bash, in order to reduce the bootstrap chain,
However, this utility works better with bash because of select builtin
Index: tzutils-2021b/tzselect.ksh
===================================================================
--- tzutils-2021b.orig/tzselect.ksh
+++ tzutils-2021b/tzselect.ksh
@@ -2,6 +2,10 @@
# Ask the user about the time zone, and output the resulting TZ value to stdout.
# Interact with the user via stderr and stdin.
+if [ -z "$BASH_VERSION" ] && [ -x /bin/bash ]; then
+ exec /bin/bash "$0" "$@"
+fi
+
PKGVERSION='(tzcode) '
TZVERSION=see_Makefile
REPORT_BUGS_TO=tz@iana.org