version 374 B

1234567891011121314151617
  1. #!/bin/sh
  2. # %W% %@%
  3. F="no_such_file"
  4. VERSION="2.0-`date '+%Y%m%d'`"
  5. for f in version.h ../src/version.h src/version.h
  6. do
  7. if [ $F = "no_such_file" -a -f $f ]
  8. then
  9. F=$f
  10. fi
  11. done
  12. if [ -f $F ]
  13. then VERSION=`awk '/MAJOR/ { major = $3; } /MINOR/ { minor=$3;} END { if (minor < 0) printf("%d.0-a%d", major, -minor); else printf("%d.%d", major, minor);}' $F`
  14. fi
  15. echo $VERSION