mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 10:33:52 +01:00
Problem: dpkg-query might fail in CI build and fail the build
Solution: rework the bash test to avoid build failures as intended and make it an easier one-liner
This commit is contained in:
parent
b2a2bb8609
commit
bbae5d0f9a
@ -23,16 +23,8 @@ if [ -z $CURVE ]; then
|
||||
elif [ $CURVE == "libsodium" ]; then
|
||||
CMAKE_OPTS+=("-DWITH_LIBSODIUM=ON")
|
||||
|
||||
if command -v dpkg-query >/dev/null 2>&1; then
|
||||
dpkg-query --list libsodium-dev >/dev/null 2>&1
|
||||
HAVE_SODIUM=$?
|
||||
elif command -v brew >/dev/null 2>&1; then
|
||||
brew ls --versions libsodium >/dev/null 2>&1
|
||||
HAVE_SODIUM=$?
|
||||
else
|
||||
HAVE_SODIUM=1
|
||||
fi
|
||||
if [ $HAVE_SODIUM -ne 0 ]; then
|
||||
if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libsodium-dev >/dev/null 2>&1) || \
|
||||
(command -v brew >/dev/null 2>&1 && brew ls --versions libsodium >/dev/null 2>&1)); then
|
||||
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
|
||||
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make check; make install)
|
||||
fi
|
||||
|
@ -19,16 +19,8 @@ if [ -z $CURVE ]; then
|
||||
elif [ $CURVE == "libsodium" ]; then
|
||||
CMAKE_OPTS+=("-DWITH_LIBSODIUM=ON")
|
||||
|
||||
if command -v dpkg-query >/dev/null 2>&1; then
|
||||
dpkg-query --list libsodium-dev >/dev/null 2>&1
|
||||
HAVE_SODIUM=$?
|
||||
elif command -v brew >/dev/null 2>&1; then
|
||||
brew ls --versions libsodium >/dev/null 2>&1
|
||||
HAVE_SODIUM=$?
|
||||
else
|
||||
HAVE_SODIUM=1
|
||||
fi
|
||||
if [ $HAVE_SODIUM -ne 0 ]; then
|
||||
if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libsodium-dev >/dev/null 2>&1) || \
|
||||
(command -v brew >/dev/null 2>&1 && brew ls --versions libsodium >/dev/null 2>&1)); then
|
||||
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
|
||||
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make check; make install)
|
||||
fi
|
||||
|
@ -19,16 +19,8 @@ if [ -z $CURVE ]; then
|
||||
elif [ $CURVE == "libsodium" ]; then
|
||||
CONFIG_OPTS+=("--with-libsodium=yes")
|
||||
|
||||
if command -v dpkg-query >/dev/null 2>&1; then
|
||||
dpkg-query --list libsodium-dev >/dev/null 2>&1
|
||||
HAVE_SODIUM=$?
|
||||
elif command -v brew >/dev/null 2>&1; then
|
||||
brew ls --versions libsodium >/dev/null 2>&1
|
||||
HAVE_SODIUM=$?
|
||||
else
|
||||
HAVE_SODIUM=1
|
||||
fi
|
||||
if [ $HAVE_SODIUM -ne 0 ]; then
|
||||
if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libsodium-dev >/dev/null 2>&1) || \
|
||||
(command -v brew >/dev/null 2>&1 && brew ls --versions libsodium >/dev/null 2>&1)); then
|
||||
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
|
||||
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make check; make install)
|
||||
fi
|
||||
|
12
ci_build.sh
12
ci_build.sh
@ -20,16 +20,8 @@ if [ $BUILD_TYPE == "default" ]; then
|
||||
elif [ $CURVE == "libsodium" ]; then
|
||||
CONFIG_OPTS+=("--with-libsodium=yes")
|
||||
|
||||
if command -v dpkg-query >/dev/null 2>&1; then
|
||||
dpkg-query --list libsodium-dev >/dev/null 2>&1
|
||||
HAVE_SODIUM=$?
|
||||
elif command -v brew >/dev/null 2>&1; then
|
||||
brew ls --versions libsodium >/dev/null 2>&1
|
||||
HAVE_SODIUM=$?
|
||||
else
|
||||
HAVE_SODIUM=1
|
||||
fi
|
||||
if [ $HAVE_SODIUM -ne 0 ]; then
|
||||
if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libsodium-dev >/dev/null 2>&1) || \
|
||||
(command -v brew >/dev/null 2>&1 && brew ls --versions libsodium >/dev/null 2>&1)); then
|
||||
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
|
||||
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make check; make install)
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user