blob: 161387a7c39b2114a1b91b001b4556d4c61e12bf [file] [log] [blame]
#!/bin/sh
#
# Little shell script to grab current version number from configure.in
#
# $Id: version,v 1.2 2003/01/28 21:58:07 jjako Exp $
VER=`grep AC_INIT configure.ac | awk -F'[(),]' '{print $3}'`
if [ "$1" == "-VERSION" ]
then
echo $VER | awk -F'.' '{print $1}'
exit
fi
if [ "$1" == "-PATCHLEVEL" ]
then
echo $VER | awk -F'.' '{print $2}'
exit
fi
if [ "$1" == "-SUBLEVEL" ]
then
echo $VER | awk -F'.' '{print $3}'
exit
fi
echo $VER
exit