Have tzselect.ksh use Bash by default; this can be overridden.

* Makefile (KSHELL): New macro.
(tzselect): Use it.
* tzselect.ksh: Use "#!/bin/bash", not "#! /bin/ksh".  The Makefile
can override this.  No need for a space after "!'; that was put in
years ago only because of an urban legend.
This commit is contained in:
Paul Eggert
2012-10-27 13:54:13 -07:00
parent 540e58b0aa
commit 6daf83cd40
2 changed files with 17 additions and 19 deletions
+5
View File
@@ -238,6 +238,10 @@ ZIC= $(zic) $(ZFLAGS)
# The name of a Posix-compliant `awk' on your system.
AWK= awk
# The full path name of a Posix-compliant shell that supports the Korn shell's
# 'select' statement, as an extension. These days, Bash is the most popular.
KSHELL= /bin/bash
# The path where SGML DTDs are kept.
# The default is appropriate for Ubuntu.
SGML_TOPDIR= /usr
@@ -389,6 +393,7 @@ date: $(DATEOBJS)
tzselect: tzselect.ksh
sed \
-e 's|#!/bin/bash|#!$(KSHELL)|g' \
-e 's|AWK=[^}]*|AWK=$(AWK)|g' \
-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
-e 's|\(TZVERSION\)=.*|\1=tz$(VERSION)|' \
+12 -19
View File
@@ -1,4 +1,4 @@
#! /bin/ksh
#!/bin/bash
TZVERSION=see_Makefile
@@ -9,29 +9,22 @@ TZVERSION=see_Makefile
# Porting notes:
#
# This script requires several features of the Korn shell.
# If your host lacks the Korn shell,
# you can use either of the following free programs instead:
# This script requires a Posix-like shell with the extension of a
# 'select' statement. The 'select' statement was introduced in the
# Korn shell and is available in Bash and other shell implementations.
# If your host lacks both Bash and the Korn shell, you can get their
# source from one of these locations:
#
# <a href=ftp://ftp.gnu.org/pub/gnu/>
# Bourne-Again shell (bash)
# </a>
#
# <a href=ftp://ftp.cs.mun.ca/pub/pdksh/pdksh.tar.gz>
# Public domain ksh
# </a>
# Bash <http://www.gnu.org/software/bash/bash.html>
# Korn Shell <http://www.kornshell.com/>
# Public Domain Korn Shell <http://www.cs.mun.ca/~michael/pdksh/>
#
# This script also uses several features of modern awk programs.
# If your host lacks awk, or has an old awk that does not conform to Posix.2,
# If your host lacks awk, or has an old awk that does not conform to Posix,
# you can use either of the following free programs instead:
#
# <a href=ftp://ftp.gnu.org/pub/gnu/>
# GNU awk (gawk)
# </a>
#
# <a href=ftp://ftp.whidbey.net/pub/brennan/>
# mawk
# </a>
# Gawk (GNU awk) <http://www.gnu.org/software/gawk/>
# mawk <http://invisible-island.net/mawk/>
# Specify default values for environment variables if they are unset.