Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / contrib / sendmail / cf / sh / makeinfo.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
4 #       All rights reserved.
5 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
6 # Copyright (c) 1988, 1993
7 #       The Regents of the University of California.  All rights reserved.
8 #
9 # By using this file, you agree to the terms and conditions set
10 # forth in the LICENSE file which can be found at the top level of
11 # the sendmail distribution.
12 #
13 #
14 #       $Id: makeinfo.sh,v 8.14 1999/02/07 07:26:25 gshapiro Exp $
15 #
16 # $FreeBSD: src/contrib/sendmail/cf/sh/makeinfo.sh,v 1.3.6.2 2001/03/05 13:08:37 ru Exp $
17 # $DragonFly: src/contrib/sendmail/cf/sh/Attic/makeinfo.sh,v 1.2 2003/06/17 04:24:06 dillon Exp $
18 #
19
20 usewhoami=0
21 usehostname=0
22 for p in `echo $PATH | sed 's/:/ /g'`
23 do
24         if [ "x$p" = "x" ]
25         then
26                 p="."
27         fi
28         if [ -f $p/whoami ]
29         then
30                 usewhoami=1
31                 if [ $usehostname -ne 0 ]
32                 then
33                         break;
34                 fi
35         fi
36         if [ -f $p/hostname ]
37         then
38                 usehostname=1
39                 if [ $usewhoami -ne 0 ]
40                 then
41                         break;
42                 fi
43         fi
44 done
45 if [ $usewhoami -ne 0 ]
46 then
47         user=`whoami`
48 else
49         user=$LOGNAME
50 fi
51
52 if [ $usehostname -ne 0 ]
53 then
54         host=`hostname`
55 else
56         host=`uname -n`
57 fi
58 echo '#####' built by $user@$host on `LC_ALL=C LC_TIME=C date`
59 echo '#####' in `pwd` | sed 's/\/tmp_mnt//'
60 echo '#####' using $1 as configuration include directory | sed 's/\/tmp_mnt//'
61 echo "define(\`__HOST__', $host)dnl"