Existing script matches too generously. eg, an annotated
tag 'foo-connectd-bar' will not be filtered. Effectively,
this commit replaces 'grep collectd' with 'grep ^collectd-',
but removes the grep and does the filtering directly in sed.
DEFAULT_VERSION="5.8.0.git"
if [ -d .git ]; then
- VERSION="`git describe --dirty=+ --abbrev=7 2> /dev/null | grep collectd | sed -e 's/^collectd-//' -e 's/-/./g'`"
+ VERSION="`git describe --dirty=+ --abbrev=7 2> /dev/null | sed -e '/^collectd-/!d' -e 's///' -e 'y/-/./'`"
fi
if test -z "$VERSION"; then