1 ?RCS: $Id: spitshell.U,v 3.0.1.4 1997/02/28 16:22:12 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
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 3.0.
11 ?RCS: $Log: spitshell.U,v $
12 ?RCS: Revision 3.0.1.4 1997/02/28 16:22:12 ram
13 ?RCS: patch61: removed useless chatter as this is now done very early
15 ?RCS: Revision 3.0.1.3 1995/01/11 15:37:01 ram
16 ?RCS: patch45: use 'test -f' instead of 'test -r' for exec-only cat progs (WED)
17 ?RCS: patch45: protected "sh -c" within backquotes for Linux and SGI
19 ?RCS: Revision 3.0.1.2 1994/08/29 16:33:00 ram
20 ?RCS: patch32: don't create spitshell under the UU directory
21 ?RCS: patch32: allow for cat in /bin or /usr/bin
23 ?RCS: Revision 3.0.1.1 1993/09/13 16:12:58 ram
24 ?RCS: patch10: made #!-failure message more friendly (WAD)
26 ?RCS: Revision 3.0 1993/08/18 12:09:49 ram
27 ?RCS: Baseline for dist 3.0 netwide release.
29 ?MAKE:spitshell shsharp sharpbang: eunicefix sh
30 ?MAKE: -pick add $@ %<
32 ?S: This variable contains the command necessary to spit out a runnable
33 ?S: shell on this system. It is either cat or a grep -v for # comments.
36 ?S: This variable tells further Configure units whether your sh can
37 ?S: handle # comments.
40 ?S: This variable contains the string #! if this system supports that
44 : see if sh knows # comments
45 ?X: This is loaded up early, so avoid being chatty.
47 ?X: echo "Checking your $sh to see if it knows about # comments..." >&2
48 if `$sh -c '#' >/dev/null 2>&1`; then
49 ?X: echo "Your $sh handles # comments correctly."
53 ?X: echo "Okay, let's see if #! works on this system..."
55 test -f $xcat || xcat=/usr/bin/cat
60 if test -s today; then
68 if test -s today; then
72 ?X: echo "Okay, let's see if #! works on this system..."
73 ?X: echo "It's just a comment."
79 echo "Your $sh doesn't grok # comments--I will strip them later on."
81 ?X: The spitshell script will be perused, so leave it out the UU directory
83 echo "exec grep -v '^[ ]*#'" >spitshell
86 spitshell=`pwd`/spitshell
88 echo "I presume that if # doesn't work, #! won't work either!"