X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=build.sh;h=bd4c1a319108e28ac3ec0b8822c733bcdd6dd4e2;hb=be121194cc100248d3f306bb3f658899b8da39fe;hp=3822c2bc1b217a9a1c93e730bfbadd0561f7a20f;hpb=39ba035b60b509311874ccf89d11d240c0271a90;p=collectd.git diff --git a/build.sh b/build.sh index 3822c2bc..bd4c1a31 100755 --- a/build.sh +++ b/build.sh @@ -1,54 +1,51 @@ -#! /bin/sh +#!/bin/sh GLOBAL_ERROR_INDICATOR=0 -check_for_application () +check_for_application() { - for PROG in "$@" - do - if ! which "$PROG" >/dev/null 2>&1; then - cat >&2 </dev/null 2>&1 + if test $? -ne 0; then + cat >&2 </dev/null 2>&1 -then - libtoolize=libtoolize -else if which glibtoolize >/dev/null 2>&1 -then - libtoolize=glibtoolize +libtoolize --version >/dev/null 2>/dev/null +if test $? -eq 0; then + libtoolize=libtoolize else - cat >&2 </dev/null 2>/dev/null + if test $? -eq 0; then + libtoolize=glibtoolize + else + cat >&2 <