X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Frun_pazpar2.sh;h=dd23b33c6650b63dd75943db0d19d5285cb3fba7;hb=3895572f92f283f91e8b30064c11ee55dfd078c9;hp=5afb462f34af938144ee497f0ca1cf9d2ebb1585;hpb=96fd9abf3bb0ccb411639fd5f24db1068235b628;p=pazpar2-moved-to-github.git diff --git a/test/run_pazpar2.sh b/test/run_pazpar2.sh index 5afb462..dd23b33 100755 --- a/test/run_pazpar2.sh +++ b/test/run_pazpar2.sh @@ -89,20 +89,24 @@ if test "$ztest" = "true" ; then F='' for p in $PATH; do if test -x $p/yaz-ztest -a -x $p/yaz-client; then - VERSION=`$p/yaz-client -V|awk '{print $3;}'|awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` - if test $VERSION -ge 4002052; then - F=$p/yaz-ztest - break - fi + VERSION=`$p/yaz-client -V 2>/dev/null|awk '{print $3;}'|awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` + if test -n "$VERSION"; then + if test $VERSION -ge 4002052; then + F=$p/yaz-ztest + break + fi + fi fi done if test -z "$F"; then for p in ${srcdir}/../../yaz ${srcdir}/../../yaz-*; do - if test -x $p/ztest/yaz-ztest -a -x $p/client/yaz-client; then - VERSION=`$p/client/yaz-client -V|awk '{print $3;}'|awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` - if test $VERSION -ge 4002052; then - F=$p/ztest/yaz-ztest - break + if test -x $p/ztest/yaz-ztest; then + VERSION=`$p/ztest/yaz-ztest -V 2>/dev/null|awk '{print $3;}'|awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` + if test -n "$VERSION"; then + if test "$VERSION" -ge 4002052; then + F=$p/ztest/yaz-ztest + break + fi fi fi done