void-packages/srcpkgs/tzutils/patches/reexec-with-bash.patch

18 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