#!/bin/sh

# script to build a version string

GIT_VERSION=$(git describe --tags --match 'v*' --dirty 2> /dev/null)
GIT_VERSION=$(echo ${GIT_VERSION} | sed 's/^v//')
if test -z ${GIT_VERSION}; then
  VERSION='unknown'
else
  VERSION=${GIT_VERSION}
fi

echo -n ${VERSION}

#!/bin/sh

# script to build a version string

GIT_VERSION=$(git describe --tags --match 'v*' --dirty 2> /dev/null)
GIT_VERSION=$(echo ${GIT_VERSION} | sed 's/^v//')
if test -z ${GIT_VERSION}; then
  VERSION='unknown'
else
  VERSION=${GIT_VERSION}
fi

/bin/echo -n ${VERSION}

Use /bin/echo so -n works on osx.
Use /bin/echo so -n works on osx.

The 'echo' built into /bin/sh on MacOS X doesn't support -n, which
confuses the AC_INIT macro. Use the separate binary which does.
