File: version

package info (click to toggle)
openggsn 0.92-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 856 kB
  • ctags: 1,230
  • sloc: ansic: 10,760; sh: 97; makefile: 31
file content (24 lines) | stat: -rwxr-xr-x 453 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
#
# Little shell script to grab current version number from configure.in
#
# $Id: version,v 1.3 2003/01/28 22:39:30 jjako Exp $

VER=`grep AC_INIT configure.in | 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