Code

Fix usage of Solaris /usr/bin/echo
[collectd.git] / version-gen.sh
index 28ad3b280674600928eb8a77f7c24a8d2cca6ea0..e2f1bec7232fb3abc52709542040de2a990e4e38 100755 (executable)
@@ -1,14 +1,17 @@
 #!/bin/sh
 
-DEFAULT_VERSION="4.6.3.git"
+DEFAULT_VERSION="4.9.2.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'`"
 
+if test "x`uname -s`" = "xAIX" -o "x`uname -s`" = "xSunOS" ; then
+       echo "$VERSION\c"
+else 
+       echo -n "$VERSION"
+fi