File: version

package info (click to toggle)
pptpd 1.3.4-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,168 kB
  • ctags: 909
  • sloc: ansic: 5,422; sh: 733; perl: 157; makefile: 132
file content (28 lines) | stat: -rwxr-xr-x 469 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#
# Grab current version number from configure.in and emit on stdout
#
# $Id: version,v 1.1.1.1 2002/06/21 08:52:02 fenix_nl Exp $

VER=`grep AM_INIT_AUTOMAKE 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