home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / m / m4v05as.zip / NEWVERS.SH < prev    next >
Linux/UNIX/POSIX Shell Script  |  1992-02-19  |  403b  |  16 lines

  1. #!/bin/sh
  2. PATH=/usr/ucb:/bin:/usr/bin:/usr/local/bin
  3. if [ ! -r RCS/"$1",v ]; then
  4.     exit 0;
  5. fi
  6.  
  7. VERSION="`rlog -h "$1" | awk -F: '$1 == "head" {printf("%.2f", $2)}'`"
  8. cat << __EOF__ > version.new
  9. /* Updated automatically --- do not modify */
  10. char version[] = "$VERSION";
  11. __EOF__
  12. echo "GNU m4, version $VERSION"
  13.  
  14. cmp -s version.h version.new || mv version.new version.h
  15. rm -f  version.new 
  16.