This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RE: [perl #26136] localtime(3) calls tzset(3), but localtime_r(3) may not.
[metaconfig.git] / U / modified / startsh.U
1 ?RCS: $Id: startsh.U,v 3.0.1.1 1997/02/28 16:25:31 ram Exp $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
4 ?RCS: 
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.
10 ?RCS:
11 ?RCS: $Log: startsh.U,v $
12 ?RCS: Revision 3.0.1.1  1997/02/28  16:25:31  ram
13 ?RCS: patch61: avoid needless chatter since this is now done very early
14 ?RCS:
15 ?RCS: Revision 3.0  1993/08/18  12:09:51  ram
16 ?RCS: Baseline for dist 3.0 netwide release.
17 ?RCS:
18 ?MAKE:startsh: sh sharpbang eunicefix
19 ?MAKE:  -pick add $@ %<
20 ?S:startsh:
21 ?S:     This variable contains the string to put on the front of a shell
22 ?S:     script to make sure (hopefully) that it runs with sh and not some
23 ?S:     other shell.
24 ?S:.
25 ?F:!sharp
26 : figure out how to guarantee sh startup
27 ?X: Avoid needless chatter since this is now done very early.
28 ?X: echo " "
29 ?X: echo "Checking out how to guarantee sh startup..." >&2
30 case "$startsh" in
31 '') startsh=${sharpbang}${sh} ;;
32 *)
33 ?X: echo "Let's see if '$startsh' works..." ;;
34 esac
35 cat >sharp <<EOSS
36 $startsh
37 set abc
38 test "$?abc" != 1
39 EOSS
40
41 chmod +x sharp
42 $eunicefix sharp
43 if ./sharp; then
44         : echo "Yup, it does."
45 else
46         echo "Hmm... '$startsh' does not guarantee sh startup..."
47         echo "You may have to fix up the shell scripts to make sure $sh runs them."
48 fi
49 rm -f sharp
50