]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.sbin/amd/include/newvers.sh
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.sbin / amd / include / newvers.sh
1 #       $NetBSD: mkconf,v 1.1.1.1 1997/07/24 21:20:12 christos Exp $
2 # $FreeBSD$
3 # mkconf
4 # Generate local configuration parameters for amd
5 #
6
7 if [ -e $1 ]; then
8         eval `LC_ALL=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT`
9         OS=`echo ${TYPE} | LC_ALL=C tr 'A-Z' 'a-z'`
10         echo '/* Define name and version of host machine (eg. solaris2.5.1) */'
11         echo "#define HOST_OS \"${OS}${REVISION}\""
12         echo '/* Define only name of host machine OS (eg. solaris2) */'
13         echo "#define HOST_OS_NAME \"${OS}${REVISION}\"" \
14                 | sed -e 's/\.[-._0-9]*//'
15         echo '/* Define only version of host machine (eg. 2.5.1) */'
16         echo "#define HOST_OS_VERSION \"${REVISION}\""
17 else
18 cat << __NO_newvers_sh
19
20 /* Define name and version of host machine (eg. solaris2.5.1) */
21 #define HOST_OS "`uname -s | LC_ALL=C tr 'A-Z' 'a-z'``uname -r`"
22
23 /* Define only name of host machine OS (eg. solaris2) */
24 #define HOST_OS_NAME "`uname -s | LC_ALL=C tr 'A-Z' 'a-z'``uname -r | sed -e 's/\..*$//'`"
25
26 /* Define only version of host machine (eg. 2.5.1) */
27 #define HOST_OS_VERSION "`uname -r | sed -e 's/[-([:alpha:]].*//'`"
28
29 __NO_newvers_sh
30 fi
31
32 cat << __EOF
33
34 /* Define name of host */
35 #define BUILD_HOST "`hostname`"
36
37 /* Define user name */
38 #define BUILD_USER "`whoami`"
39
40 /* Define configuration date */
41 #define BUILD_DATE "`LC_ALL=C date`"
42
43 __EOF