From 597cc5edd624525563e6549dc0057eca2a51c81d Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 11 Nov 2014 13:30:46 -0500 Subject: upgrade to new version --- version.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 version.sh (limited to 'version.sh') diff --git a/version.sh b/version.sh new file mode 100755 index 0000000..b4425d0 --- /dev/null +++ b/version.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# +# This script extracts the 0MQ version from include/zmq.h, which is the master +# location for this information. +# +if [ ! -f include/zmq.h ]; then + echo "version.sh: error: include/zmq.h does not exist" 1>&2 + exit 1 +fi +MAJOR=`egrep '^#define +ZMQ_VERSION_MAJOR +[0-9]+$' include/zmq.h` +MINOR=`egrep '^#define +ZMQ_VERSION_MINOR +[0-9]+$' include/zmq.h` +PATCH=`egrep '^#define +ZMQ_VERSION_PATCH +[0-9]+$' include/zmq.h` +if [ -z "$MAJOR" -o -z "$MINOR" -o -z "$PATCH" ]; then + echo "version.sh: error: could not extract version from include/zmq.h" 1>&2 + exit 1 +fi +MAJOR=`echo $MAJOR | awk '{ print $3 }'` +MINOR=`echo $MINOR | awk '{ print $3 }'` +PATCH=`echo $PATCH | awk '{ print $3 }'` +echo $MAJOR.$MINOR.$PATCH | tr -d '\n' + -- cgit v1.2.3