Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame^] | 1 | From 27d3ec9df3157966819e4369e571769ed9e8604c Mon Sep 17 00:00:00 2001 |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 9 Dec 2021 15:14:42 -0800 |
| 4 | Subject: [PATCH] timezone: Make shell interpreter overridable in tzselect.ksh |
| 5 | |
| 6 | define new macro called KSHELL which can be used to define default shell |
| 7 | use Bash by default |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | --- |
| 12 | Makeconfig | 9 +++++++++ |
| 13 | timezone/Makefile | 1 + |
| 14 | 2 files changed, 10 insertions(+) |
| 15 | |
| 16 | diff --git a/Makeconfig b/Makeconfig |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame^] | 17 | index 2fda4af5f7..87777942f3 100644 |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 18 | --- a/Makeconfig |
| 19 | +++ b/Makeconfig |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame^] | 20 | @@ -309,6 +309,15 @@ ifndef sysincludedir |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 21 | sysincludedir = /usr/include |
| 22 | endif |
| 23 | |
| 24 | +# The full path name of a Posix-compliant shell, preferably one that supports |
| 25 | +# the Korn shell's 'select' statement as an extension. |
| 26 | +# These days, Bash is the most popular. |
| 27 | +# It should be OK to set this to /bin/sh, on platforms where /bin/sh |
| 28 | +# lacks 'select' or doesn't completely conform to Posix, but /bin/bash |
| 29 | +# is typically nicer if it works. |
| 30 | +ifndef KSHELL |
| 31 | +KSHELL = /bin/bash |
| 32 | +endif |
| 33 | |
| 34 | # Commands to install files. |
| 35 | ifndef INSTALL_DATA |
| 36 | diff --git a/timezone/Makefile b/timezone/Makefile |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame^] | 37 | index 0306c0bca9..4dfdcebdb7 100644 |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 38 | --- a/timezone/Makefile |
| 39 | +++ b/timezone/Makefile |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame^] | 40 | @@ -136,6 +136,7 @@ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 41 | -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ |
| 42 | -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ |
| 43 | -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \ |
| 44 | + -e 's|#!/bin/bash|#!$(KSHELL)|g' \ |
| 45 | < $< > $@.new |
| 46 | chmod 555 $@.new |
| 47 | mv -f $@.new $@ |