aboutsummaryrefslogtreecommitdiffstats
path: root/version
diff options
context:
space:
mode:
authorjjako <jjako>2002-12-16 13:33:51 +0000
committerjjako <jjako>2002-12-16 13:33:51 +0000
commit52c2414f6cabefb0427475756e8ac4856180bc59 (patch)
tree5ecb31a74c392c36a7d7c802f18d37349973bf00 /version
Initial revision
Diffstat (limited to 'version')
-rwxr-xr-xversion24
1 files changed, 24 insertions, 0 deletions
diff --git a/version b/version
new file mode 100755
index 0000000..61a783f
--- /dev/null
+++ b/version
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# Little shell script to grab current version number from configure.in
+#
+# $Id: version,v 1.1 2002/12/16 13:33:52 jjako 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