diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-10-18 15:26:08 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-10-18 15:26:08 +0100 |
commit | ee89b4ab594e3027c04052108ea8b494750fe26c (patch) | |
tree | 66eda110b9a9a4f557a2ccfb1cb1d260218c161b /tools/check/check_zlib_lib | |
parent | 19c8d7a8fa0bb6c959135c537144fa2a4044d790 (diff) | |
download | xen-ee89b4ab594e3027c04052108ea8b494750fe26c.tar.gz xen-ee89b4ab594e3027c04052108ea8b494750fe26c.tar.bz2 xen-ee89b4ab594e3027c04052108ea8b494750fe26c.zip |
Fix 'chk' scripts for generic shell (non-bash) and *BSD.
From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/check/check_zlib_lib')
-rwxr-xr-x | tools/check/check_zlib_lib | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/check/check_zlib_lib b/tools/check/check_zlib_lib index 8820a30371..92d879ceda 100755 --- a/tools/check/check_zlib_lib +++ b/tools/check/check_zlib_lib @@ -1,11 +1,14 @@ -#!/bin/bash +#!/bin/sh # CHECK-BUILD CHECK-INSTALL -function error { - echo - echo " *** Check for zlib library FAILED" - exit 1 -} +RC=0 set -e -ldconfig -p | grep -q libz.so || error +ldconfig -v 2>&1 | grep -q libz.so || RC=1 + +if test ${RC} -ne 0; then + echo + echo " *** Check for zlib library FAILED" +fi + +exit ${RC} |