Skip to content

Commit

Permalink
build.sh, version-gen.sh: Remove bashisms.
Browse files Browse the repository at this point in the history
Thanks to Peter Bray for pointing them out.
  • Loading branch information
octo committed Jul 12, 2009
1 parent 3ad4d23 commit de1d790
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ check_for_application ()
{
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
Expand Down
7 changes: 3 additions & 4 deletions version-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

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"

0 comments on commit de1d790

Please sign in to comment.