Annotation of XNU/osfmk/conf/tools/kernel_newvers/kernel_newvers.csh, revision 1.1.1.1

1.1       root        1: #!/bin/sh -
                      2: #
                      3: # Mach Operating System
                      4: # Copyright (c) 1990 Carnegie-Mellon University
                      5: # Copyright (c) 1989 Carnegie-Mellon University
                      6: # All rights reserved.  The CMU software License Agreement specifies
                      7: # the terms and conditions for use and redistribution.
                      8: #
                      9: 
                     10: #
                     11: # kernel_newvers.sh    copyright major minor variant
                     12: #
                     13: 
                     14: major="$1"; minor="$2"; variant="$3"
                     15: v="${major}.${minor}" d="${OBJROOT}/${KERNEL_CONFIG}_${ARCH_CONFIG}" s="${SRCROOT}" h=`hostname` t=`date` w=`whoami`
                     16: if [ -z "$d" -o -z "$h" -o -z "$t" ]; then
                     17:     exit 1
                     18: fi
                     19: CONFIG=`expr "$d" : '.*/\([^/]*\)$'`
                     20: d=`expr "$d" : '.*/\([^/]*/[^/]*/[^/]*\)$'`
                     21: s=`expr "$s" : '.*/\([^/]*/[^/]*\)$'`
                     22: (
                     23:   /bin/echo "int  version_major      = ${major};" ;
                     24:   /bin/echo "int  version_minor      = ${minor};" ;
                     25:   /bin/echo "char version_variant[]  = \"${variant}\";" ;
                     26:   /bin/echo "char version[] = \"Darwin Kernel Version ${v}:\\n${t}; $w:$d\\n\\n\";" ;
                     27:   /bin/echo "char osrelease[] = \"${major}.${minor}\";" ;
                     28:   /bin/echo "char ostype[] = \"Darwin\";" ;
                     29: ) > kernel_vers.c
                     30: if [ -s vers.suffix -o ! -f vers.suffix ]; then
                     31:     rm -f vers.suffix
                     32:     echo ".${variant}.${CONFIG}" > vers.suffix
                     33: fi
                     34: exit 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.