1*b30d1939SAndy Fiddamanast-ksh :PACKAGE: ksh93 libast libcmd libcoshell libsum libdll
2*b30d1939SAndy Fiddaman
3*b30d1939SAndy Fiddaman:COVERS: ksh
4*b30d1939SAndy Fiddaman
5*b30d1939SAndy Fiddaman:LICENSE: *.open
6*b30d1939SAndy Fiddaman
7*b30d1939SAndy Fiddaman:CATEGORY: shells
8*b30d1939SAndy Fiddaman
9*b30d1939SAndy Fiddaman:INDEX: ksh and support libraries
10*b30d1939SAndy Fiddaman
11*b30d1939SAndy Fiddaman:DESCRIPTION:
12*b30d1939SAndy Fiddaman	The AT&T Software Technology ast-ksh package from AT&T Research
13*b30d1939SAndy Fiddaman	contains ksh and support libraries. This is the minimal set of
14*b30d1939SAndy Fiddaman	components needed to build ksh.
15*b30d1939SAndy Fiddaman
16*b30d1939SAndy Fiddaman:DETAILS: cyg
17*b30d1939SAndy Fiddaman	:README:
18*b30d1939SAndy Fiddaman		This package installs a standalone ksh93 executable ksh93.exe
19*b30d1939SAndy Fiddaman		and its man page ksh93.1.  If /bin/ksh.exe does not exist then
20*b30d1939SAndy Fiddaman		these symlinks
21*b30d1939SAndy Fiddaman			/bin/ksh.exe => ksh93.exe
22*b30d1939SAndy Fiddaman			/usr/share/man/man1/ksh93.1 => ksh.1
23*b30d1939SAndy Fiddaman		are created.  This allows alternative ksh impelementations,
24*b30d1939SAndy Fiddaman		e.g., /bin/pdksh.exe, to be selected by changing the ksh.exe
25*b30d1939SAndy Fiddaman		and ksh.1 symbolic links.  In addition, ksh and ksh93 paths are
26*b30d1939SAndy Fiddaman		added to /etc/shells if not already present.
27*b30d1939SAndy Fiddaman		$()
28*b30d1939SAndy Fiddaman		Each builtin or special command accepts the --man and --html
29*b30d1939SAndy Fiddaman		options to list the man page on the standard error. The --???
30*b30d1939SAndy Fiddaman		option describes the self documenting options available to all
31*b30d1939SAndy Fiddaman		builtin and special commands.
32*b30d1939SAndy Fiddaman		$()
33*b30d1939SAndy Fiddaman		The stanadlone ksh is statically linked with the ast libcmd
34*b30d1939SAndy Fiddaman		library which provides several builtin versions of /bin
35*b30d1939SAndy Fiddaman		commands. "builtin | grep /opt/ast/bin" lists the libcmd
36*b30d1939SAndy Fiddaman		builtins on the standard output. /opt/ast/bin/FOO accesses
37*b30d1939SAndy Fiddaman		the FOO builtin, whether the /opt/ast/bin directory exists
38*b30d1939SAndy Fiddaman		or not. "builtin FOO" allows /opt/ast/bin/FOO to be accessed
39*b30d1939SAndy Fiddaman		as FOO, bypassing the $PATH setting. To enable all libcmd
40*b30d1939SAndy Fiddaman		builtins do one of the following:
41*b30d1939SAndy Fiddaman		  (a) create the directory /opt/ast/bin and the file
42*b30d1939SAndy Fiddaman		      /opt/ast/bin/.paths with this line
43*b30d1939SAndy Fiddaman		      	BUILTIN_LIB=.
44*b30d1939SAndy Fiddaman		      and place /opt/ast/bin before /bin and /usr/bin in $PATH
45*b30d1939SAndy Fiddaman		      (this will affect all ksh subshells and scripts)
46*b30d1939SAndy Fiddaman		  (b) run "builtin $( builtin | sed -e '/\//!d' -e 's,.*/,,' )"
47*b30d1939SAndy Fiddaman		      (this will affect only the current shell)
48*b30d1939SAndy Fiddaman		Some scripts may run significantly faster with libcmd builtins
49*b30d1939SAndy Fiddaman		enabled.
50*b30d1939SAndy Fiddaman		$()
51*b30d1939SAndy Fiddaman		The ast library checks the DOSPATHVARS environment variable
52*b30d1939SAndy Fiddaman		for variable path values to convert to and from native windows
53*b30d1939SAndy Fiddaman		format when cross-executing between cygwin and non-cygwin
54*b30d1939SAndy Fiddaman		programs. The value is a space separated list of environment
55*b30d1939SAndy Fiddaman		variables to convert. PATH is handled by cygwin so it is not
56*b30d1939SAndy Fiddaman		converted by the ast library.
57*b30d1939SAndy Fiddaman		$()
58*b30d1939SAndy Fiddaman		The astksh cygwin source package provides a bootstrap build
59*b30d1939SAndy Fiddaman		environment that is not suited for an edit/build/debug cycle.
60*b30d1939SAndy Fiddaman		If you want to explore and modify the source then you should
61*b30d1939SAndy Fiddaman		install the (non-cygwinized) ast-base package which includes
62*b30d1939SAndy Fiddaman		AT&T nmake. With ast-base you will also be able to regenerate
63*b30d1939SAndy Fiddaman		the astksh cygwin source and binary packages.
64*b30d1939SAndy Fiddaman		$()
65*b30d1939SAndy Fiddaman		For more information on ksh and other AT&T ast tools see
66*b30d1939SAndy Fiddaman		   http://www.research.att.com/sw/download/
67*b30d1939SAndy Fiddaman	:EXPORT:
68*b30d1939SAndy Fiddaman		SHOPT_CMDLIB_DIR=1
69*b30d1939SAndy Fiddaman	bin/ksh93.exe :INSTALL: bin/ksh.exe
70*b30d1939SAndy Fiddaman	share/man/man1/ksh93.1 :INSTALL: man/man1/sh.1
71*b30d1939SAndy Fiddaman	:POSTINSTALL:
72*b30d1939SAndy Fiddaman		if	[ ! -e /bin/ksh.exe ]
73*b30d1939SAndy Fiddaman		then	ln -fs ksh93.exe /bin/ksh.exe
74*b30d1939SAndy Fiddaman			ln -fs ksh93.1 /usr/share/man/man1/ksh.1
75*b30d1939SAndy Fiddaman		else	echo "/bin/ksh.exe already exists"
76*b30d1939SAndy Fiddaman		fi
77*b30d1939SAndy Fiddaman		if [ -f /etc/shells ]
78*b30d1939SAndy Fiddaman		then	for i in /bin/ksh93 /bin/ksh /usr/bin/ksh93 /usr/bin/ksh
79*b30d1939SAndy Fiddaman			do	if	grep $i /etc/shells >/dev/null 2>&1
80*b30d1939SAndy Fiddaman				then	echo "$i already in /etc/shells"
81*b30d1939SAndy Fiddaman				else	echo $i >> /etc/shells
82*b30d1939SAndy Fiddaman					echo "$i added to /etc/shells"
83*b30d1939SAndy Fiddaman				fi
84*b30d1939SAndy Fiddaman			done
85*b30d1939SAndy Fiddaman		else	echo "no /etc/shells file"
86*b30d1939SAndy Fiddaman		fi
87*b30d1939SAndy Fiddaman		exit 0
88*b30d1939SAndy Fiddaman	:TEST: bin/ksh
89*b30d1939SAndy Fiddaman		KSH=$<; cd src/cmd/ksh93/tests; CYGWIN="$$CYGWIN ntsec binmode" SHELL=$$KSH $$KSH shtests
90