version 469 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. #
  3. # Grab current version number from configure.in and emit on stdout
  4. #
  5. # $Id: version,v 1.1.1.1 2002/06/21 08:52:02 fenix_nl Exp $
  6. VER=`grep AM_INIT_AUTOMAKE configure.in | awk -F'[(),]' '{print $3}'`
  7. if [ "$1" == "-VERSION" ]
  8. then
  9. echo $VER | awk -F'.' '{print $1}'
  10. exit
  11. fi
  12. if [ "$1" == "-PATCHLEVEL" ]
  13. then
  14. echo $VER | awk -F'.' '{print $2}'
  15. exit
  16. fi
  17. if [ "$1" == "-SUBLEVEL" ]
  18. then
  19. echo $VER | awk -F'.' '{print $3}'
  20. exit
  21. fi
  22. echo $VER
  23. exit