version 465 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. #
  3. # Little shell script to grab current version number from configure.in
  4. #
  5. # $Id: version,v 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