Thanks to Peter Bray for pointing them out.
{
for PROG in "$@"
do
- if ! which "$PROG" >/dev/null 2>&1; then
+ which "$PROG" >/dev/null 2>&1
+ if test $? -ne 0; then
cat >&2 <<EOF
WARNING: \`$PROG' not found!
Please make sure that \`$PROG' is installed and is in one of the
DEFAULT_VERSION="4.6.3.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"