blob: 161387a7c39b2114a1b91b001b4556d4c61e12bf [file] [log] [blame]
jjako52c24142002-12-16 13:33:51 +00001#!/bin/sh
2#
3# Little shell script to grab current version number from configure.in
4#
jjako52c62342003-01-28 21:58:05 +00005# $Id: version,v 1.2 2003/01/28 21:58:07 jjako Exp $
jjako52c24142002-12-16 13:33:51 +00006
jjako52c62342003-01-28 21:58:05 +00007VER=`grep AC_INIT configure.ac | awk -F'[(),]' '{print $3}'`
jjako52c24142002-12-16 13:33:51 +00008if [ "$1" == "-VERSION" ]
9then
10 echo $VER | awk -F'.' '{print $1}'
11 exit
12fi
13if [ "$1" == "-PATCHLEVEL" ]
14then
15 echo $VER | awk -F'.' '{print $2}'
16 exit
17fi
18if [ "$1" == "-SUBLEVEL" ]
19then
20 echo $VER | awk -F'.' '{print $3}'
21 exit
22fi
23echo $VER
24exit