]>
git.saurik.com Git - apple/xnu.git/blob - libkern/conf/tools/newvers/newvers.csh
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.
11 # newvers.sh copyright major minor variant
14 major
="$1"; minor
="$2"; variant
="$3"
15 v
="${major}.${minor}" d
=`pwd` h
="rcbuilder" t
=`date` w
=`whoami`
16 if [ -z "$d" -o -z "$h" -o -z "$t" ]; then
19 CONFIG
=`expr "$d" : '.*/\([^/]*\)$'`
20 d
=`expr "$d" : '.*/\([^/]*/[^/]*/[^/]*\)$'`
22 /bin
/echo "int ${COMPONENT}_version_major = ${major};" ;
23 /bin
/echo "int ${COMPONENT}_version_minor = ${minor};" ;
24 /bin
/echo "char ${COMPONENT}_version_variant[] = \"${variant}\";" ;
25 /bin
/echo "char ${COMPONENT}_version[] = \"Common Services Component Version ${v}:\\n${t}; $w($h):$d\\n\";" ;
26 /bin
/echo "char ${COMPONENT}_osrelease[] = \"${major}.${minor}\";" ;
27 /bin
/echo "char ${COMPONENT}_ostype[] = \"Common Services\";" ;
28 /bin
/echo "char ${COMPONENT}_builder[] = \"$w\";" ;
30 if [ -s vers.suffix
-o ! -f vers.suffix
]; then
32 echo ".${variant}.${CONFIG}" > vers.suffix