Sha256: 5da73f6e4f6a7a66d1d91e8a5b184a4a03e50d063a8742601e28bd2ddbb69a3f

Contents?: true

Size: 736 Bytes

Versions: 11

Compression:

Stored size: 736 Bytes

Contents

#!/bin/sh
#
# This script extracts the version from the project header file
#
project=$1
if [ ! -f include/$project.h ]; then
    echo "version.sh: error: include/$project.h does not exist" 1>&2
    exit 1
fi
MAJOR=`egrep '^#define .*_VERSION_MAJOR +[0-9]+$' include/$project.h`
MINOR=`egrep '^#define .*_VERSION_MINOR +[0-9]+$' include/$project.h`
PATCH=`egrep '^#define .*_VERSION_PATCH +[0-9]+$' include/$project.h`
if [ -z "$MAJOR" -o -z "$MINOR" -o -z "$PATCH" ]; then
    echo "version.sh: error: could not extract version from include/$project.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'

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rbczmq-1.7.9 ext/czmq/version.sh
rbczmq-1.7.8 ext/czmq/version.sh
rbczmq-1.7.7 ext/czmq/version.sh
rbczmq-1.7.6 ext/czmq/version.sh
rbczmq-1.7.5 ext/czmq/version.sh
rbczmq-1.7.4 ext/czmq/version.sh
rbczmq-1.7.3 ext/czmq/version.sh
rbczmq-1.7.2 ext/czmq/version.sh
rbczmq-1.7.1 ext/czmq/version.sh
rbczmq-1.7.0 ext/czmq/version.sh
rbczmq-1.6.4 ext/czmq/version.sh