mirror of
https://github.com/collectd/collectd.git
synced 2026-02-09 04:09:15 +08:00
This breaks PACKAGEVERSION since the -n is left verbatim in the string. Use the more portable printf instead
14 lines
238 B
Bash
Executable File
14 lines
238 B
Bash
Executable File
#!/bin/sh
|
|
|
|
DEFAULT_VERSION="5.3.1.git"
|
|
|
|
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'`"
|
|
|
|
printf "%s" "$VERSION"
|