home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / bsdss4.tz / bsdss4 / bsdss / server / conf / newvers.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1992-04-22  |  2.0 KB  |  63 lines

  1. #!/bin/sh -
  2. # Mach Operating System
  3. # Copyright (c) 1992 Carnegie Mellon University
  4. # All Rights Reserved.
  5. # Permission to use, copy, modify and distribute this software and its
  6. # documentation is hereby granted, provided that both the copyright
  7. # notice and this permission notice appear in all copies of the
  8. # software, derivative works or modified versions, and any portions
  9. # thereof, and that both notices appear in supporting documentation.
  10. # CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  11. # CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  12. # ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  13. # Carnegie Mellon requests users of this software to return to
  14. #  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  15. #  School of Computer Science
  16. #  Carnegie Mellon University
  17. #  Pittsburgh PA 15213-3890
  18. # any improvements or extensions that they make and grant Carnegie Mellon 
  19. # the rights to redistribute these changes.
  20. #
  21. #
  22. # HISTORY
  23. # $Log:    newvers.sh,v $
  24. # Revision 2.1  92/04/21  17:11:54  rwd
  25. # BSDSS
  26. #
  27. #
  28.  
  29. CONFIG="$1"; copyright="$2"; major="$3"; min="$4";
  30. variant="$5"; build="$6"; patch="$7";
  31. h=`hostname` t=`date`
  32. v="${major}.${min}.${patch}"
  33. b="${variant}${build}"
  34. if [ -z "$h" -o -z "$t" -o -z "${CONFIG}" ]; then
  35.     exit 1
  36. fi
  37. (
  38.   echo "#ifdef __STDC__" ;
  39.   echo "#define CONST const" ;
  40.   echo "#else" ;
  41.   echo "#define CONST" ;
  42.   echo "#endif" ;
  43.   echo "CONST int  version_major      = ${major};" ;
  44.   echo "CONST int  version_minor      = ${min};" ;
  45.   echo "CONST char version_version[32]  = \"${v}\";" ;
  46.   echo "CONST char version_release[32]  = \"${b}\";" ;
  47.   echo "CONST char version[] = \"Mach 3.0 BSD${v} (${variant}${build}); ${t}; ${CONFIG} ($h)\\n\";" ;
  48.   echo "CONST char copyright[] = \"\\" ;
  49.   sed <$copyright -e '/^#/d' -e 's;[     ]*$;;' -e '/^$/d' -e 's;$;\\n\\;' ;
  50.   echo "\";";
  51. ) > vers.c
  52. if [ -s vers.suffix -o ! -f vers.suffix ]; then
  53.     echo ".${b}.${CONFIG}" >vers.suffix
  54. fi
  55. exit 0
  56.