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