summaryrefslogtreecommitdiff
path: root/qa/mk.pcpversion
blob: de865cbe72d54fb08d003114fab0d93d4c483193 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/sh
#
# given a dotted notation pcp version string, produce a single number
#
# Copyright (c) 1997-2002 Silicon Graphics, Inc.  All Rights Reserved.
#

VERSION=$1
PCP_VER=`echo "$VERSION" \
	     | sed \
		 -e '/^[^.]*\.[^.]*$/s/$/.0/' \
		 -e 's/\.\([0-9]\)$/.0\1/' \
		 -e 's/\.//g'`
[ -z "$PCP_VER" ] && PCP_VER=0
echo PCP_VER=$PCP_VER