The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/conf/newvers.sh

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #!/bin/sh -
    2 #
    3 # Mach Operating System
    4 # Copyright (c) 1991,1990,1989 Carnegie Mellon University
    5 # All Rights Reserved.
    6 # 
    7 # Permission to use, copy, modify and distribute this software and its
    8 # documentation is hereby granted, provided that both the copyright
    9 # notice and this permission notice appear in all copies of the
   10 # software, derivative works or modified versions, and any portions
   11 # thereof, and that both notices appear in supporting documentation.
   12 # 
   13 # CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   14 # CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   15 # ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   16 # 
   17 # Carnegie Mellon requests users of this software to return to
   18 # 
   19 #  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   20 #  School of Computer Science
   21 #  Carnegie Mellon University
   22 #  Pittsburgh PA 15213-3890
   23 # 
   24 # any improvements or extensions that they make and grant Carnegie Mellon
   25 # the rights to redistribute these changes.
   26 #
   27 #
   28 # HISTORY
   29 # $Log: newvers.sh,v $
   30 # Revision 2.8  93/05/16  15:25:40  mrt
   31 #       Removed use of version.minor and use version.major
   32 #       [93/05/16            mrt]
   33 # 
   34 # Revision 2.7  93/03/09  10:53:03  danner
   35 #       Fixed build of version string to accomodate both BSD and OSF/1
   36 #       /bin/echo commands. ("\n" can't be echoed with the same command)
   37 #       From: [93/01/12            bernadat]
   38 # 
   39 # Revision 2.6  91/05/08  12:25:38  dbg
   40 #       Added one more sed clause to deal with the "'s in the new 
   41 #       copyright.
   42 #       [91/05/07            mrt]
   43 # 
   44 # Revision 2.5  91/02/05  17:05:40  mrt
   45 #       Changed to new copyright
   46 #       [91/01/28  14:48:14  mrt]
   47 # 
   48 # Revision 2.4  90/09/14  12:56:01  rwd
   49 #       Dont printout major.minor in VERSION string.
   50 #       [90/09/14            rwd]
   51 # 
   52 # Revision 2.3  90/08/27  21:48:12  dbg
   53 #       Document that this file was created at CMU.
   54 #       [90/07/13            dbg]
   55 # 
   56 # Revision 2.2  89/11/29  14:08:47  af
   57 #       Use Mach version id.
   58 # 
   59 # Revision 2.1  89/08/03  17:38:33  rwd
   60 # Created.
   61 # 
   62 
   63 #
   64 # newvers.sh    copyright major minor variant edit patch
   65 #
   66 
   67 copyright="$1"; major="$2"; variant="$3"; edit="$4"; patch="$5"; 
   68 v="VERSION(${variant}${edit}${patch})" d=`pwd` h=`hostname` t=`date`
   69 if [ -z "$d" -o -z "$h" -o -z "$t" ]; then
   70     exit 1
   71 fi
   72 CONFIG=`expr "$d" : '.*/\([^/]*\)$'`
   73 d=`expr "$d" : '.*/\([^/]*/[^/]*\)$'`
   74 (
   75   /bin/echo "char  version_major[]   = \"${major}\";" ;
   76   /bin/echo "char version_variant[]  = \"${variant}\";" ;
   77   /bin/echo "char version_patch[]    = \"${patch}\";" ;
   78   /bin/echo "int  version_edit       = ${edit};" ;
   79   /bin/echo "char version[] = \"${major} ${v}: ${t}; $d ($h)\\n\";" ;
   80   /bin/echo "char cmu_copyright[] = \"\\" ;
   81   sed <$copyright -e '/^#/d' -e 's/"/\\"/g' -e 's;[     ]*$;;' -e '/^$/d' -e 's;$;\\n\\;' ;
   82   /bin/echo "\";";
   83 ) > vers.c
   84 if [ -s vers.suffix -o ! -f vers.suffix ]; then
   85     echo ".${variant}${edit}${patch}.${CONFIG}" >vers.suffix
   86 fi
   87 exit 0

Cache object: 6a2d978013e21fc06cd59daaee5f7cd4


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.