Code

Merge remote-tracking branch 'github/pr/387'
[collectd.git] / version-gen.sh
index 99bcb7e63d43031397f1cca08182f61dfe8263e6..4be9a4946426f4a370d4880e40695fd53235c543 100755 (executable)
@@ -1,14 +1,13 @@
-#!/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
 
-VERSION=$( echo "$VERSION" | sed -e 's/-/./g' )
-
-echo -n $VERSION
+VERSION="`echo \"$VERSION\" | sed -e 's/-/./g'`"
 
+echo -n "$VERSION"