summaryrefslogtreecommitdiff
path: root/mcon/U/prefshell.U
blob: 315f689900f4c20e73b3e5f987572f516a04b32e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
?RCS: $Id$
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: prefshell.U,v $
?RCS: Revision 3.0.1.2  1994/10/29  16:28:13  ram
?RCS: patch36: added SHELL temporary since metalint now sees ${SHELL}
?RCS:
?RCS: Revision 3.0.1.1  1993/09/13  16:11:47  ram
?RCS: patch10: non-portable var substitution was used (WAD)
?RCS:
?RCS: Revision 3.0  1993/08/18  12:09:34  ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:prefshell: cat package Getfile Oldconfig ksh csh bash
?MAKE:	-pick add $@ %<
?S:prefshell:
?S:	This variable contains the eventual value of the PREFSHELL symbol,
?S:	which contains the full name of the preferred user shell on this
?S:	system.  Usual values are /bin/csh, /bin/ksh, /bin/sh.
?S:.
?C:PREFSHELL:
?C:	This symbol contains the full name of the preferred user shell on this
?C:	system.  Usual values are /bin/csh, /bin/ksh, /bin/sh.
?C:.
?H:#define PREFSHELL "$prefshell"		/**/
?H:.
?T:SHELL
: find out which shell people like to use most
case "$prefshell" in
'')
	case "$ksh $bash $csh" in
	*/ksh*) dflt="$ksh" ;;
	*/bash*) dflt="$bash" ;;
	*/csh*) dflt="$csh" ;;
	*) dflt='/bin/sh' ;;
	esac
	;;
*)  dflt="$prefshell";;
esac
?X: Some shells (Ultrix) do not understand ${SHELL:-/bin/sh}, sigh!
$cat <<EOM

Give the full path name of the shell most people like to use on your system.
This will be used by $package whenever the user wants to get a shell
escape (for instance) and is not necessarily the same as the shell you are
currently using (${SHELL-/bin/sh}).

EOM
fn=f/~
rp='Preferred shell to be used?'
. ./getfile
prefshell=$ans