home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / bootp.2.2+FdC.tar.Z / bootp.2.2+FdC.tar / newvers.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1992-03-23  |  817b  |  25 lines

  1. #!/bin/sh -
  2. #
  3. # Copyright (c) 1987 Regents of the University of California.
  4. # All rights reserved.
  5. #
  6. # Redistribution and use in source and binary forms are permitted
  7. # provided that this notice is preserved and that due credit is given
  8. # to the University of California at Berkeley. The name of the University
  9. # may not be used to endorse or promote products derived from this
  10. # software without specific prior written permission. This software
  11. # is provided ``as is'' without express or implied warranty.
  12. #
  13. #    @(#)newvers.sh    4.4 (Berkeley) 3/28/88
  14. #
  15. if [ ! -r version ]
  16. then
  17.     echo 0 > version
  18. fi
  19. touch version
  20. rm -f version.[oc]
  21. v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date`
  22. sed -e "s|%VERSION%|#${v}: ${t}|" -e "s|%WHOANDWHERE%|${u}@${h}:${d}|" \
  23.     < $1 >version.c
  24. /bin/echo `expr ${v} + 1` > version
  25.