From: Kieran Bingham Date: Tue, 17 Sep 2013 17:35:38 +0000 (+0100) Subject: version-gen.sh: Ensure only collectd repository versions are used X-Git-Tag: collectd-5.5.0~262^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1415c4ed9149c134813368caf728a79fd6e69800;p=collectd.git version-gen.sh: Ensure only collectd repository versions are used When cross compiling in hosted environments using RPM, the extracted tar-ball can be located in a parent .git repository. The version-gen.sh script will then take the version number from this repository as if it represents collectd. This can be even more erroneous when the version returned is non numerical and breaks the build Signed-off-by: Kieran Bingham --- diff --git a/version-gen.sh b/version-gen.sh index e89e7113..7fbc8671 100755 --- a/version-gen.sh +++ b/version-gen.sh @@ -2,7 +2,7 @@ DEFAULT_VERSION="5.4.0.git" -VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`" +VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`" if test -z "$VERSION"; then VERSION="$DEFAULT_VERSION"