diff --git a/version-gen.sh b/version-gen.sh
index 99bcb7e63d43031397f1cca08182f61dfe8263e6..4be9a4946426f4a370d4880e40695fd53235c543 100755 (executable)
--- a/version-gen.sh
+++ b/version-gen.sh
-#!/bin/sh
+#!/usr/bin/env bash
-DEFAULT_VERSION="4.7.0.git"
+DEFAULT_VERSION="5.3.0.git"
-VERSION="$( git describe 2> /dev/null | sed -e 's/^collectd-//' )"
+VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"
if test -z "$VERSION"; then
VERSION="$DEFAULT_VERSION"
fi
if test -z "$VERSION"; then
VERSION="$DEFAULT_VERSION"
fi
-VERSION=$( echo "$VERSION" | sed -e 's/-/./g' )
-
-echo -n $VERSION
+VERSION="`echo \"$VERSION\" | sed -e 's/-/./g'`"
+echo -n "$VERSION"