File tree Expand file tree Collapse file tree 4 files changed +8
-40
lines changed
Expand file tree Collapse file tree 4 files changed +8
-40
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,8 @@ if [ -z $CURVE ]; then
2323elif [ $CURVE == " libsodium" ]; then
2424 CMAKE_OPTS+=(" -DWITH_LIBSODIUM=ON" )
2525
26- if command -v dpkg-query > /dev/null 2>&1 ; then
27- dpkg-query --list libsodium-dev > /dev/null 2>&1
28- HAVE_SODIUM=$?
29- elif command -v brew > /dev/null 2>&1 ; then
30- brew ls --versions libsodium > /dev/null 2>&1
31- HAVE_SODIUM=$?
32- else
33- HAVE_SODIUM=1
34- fi
35- if [ $HAVE_SODIUM -ne 0 ]; then
26+ if ! (( command - v dpkg- query >/ dev/ null 2 >& 1 && dpkg- query -- list libsodium- dev >/ dev/ null 2 >& 1 ) || \
27+ (command -v brew >/dev/null 2 >&1 && brew ls --versions libsodium >/dev/null 2 >&1 )) ; then
3628 git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
3729 ( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX ; make check; make install)
3830 fi
Original file line number Diff line number Diff line change @@ -19,16 +19,8 @@ if [ -z $CURVE ]; then
1919elif [ $CURVE == " libsodium" ]; then
2020 CMAKE_OPTS+=(" -DWITH_LIBSODIUM=ON" )
2121
22- if command -v dpkg-query > /dev/null 2>&1 ; then
23- dpkg-query --list libsodium-dev > /dev/null 2>&1
24- HAVE_SODIUM=$?
25- elif command -v brew > /dev/null 2>&1 ; then
26- brew ls --versions libsodium > /dev/null 2>&1
27- HAVE_SODIUM=$?
28- else
29- HAVE_SODIUM=1
30- fi
31- if [ $HAVE_SODIUM -ne 0 ]; then
22+ if ! (( command - v dpkg- query >/ dev/ null 2 >& 1 && dpkg- query -- list libsodium- dev >/ dev/ null 2 >& 1 ) || \
23+ (command -v brew >/dev/null 2 >&1 && brew ls --versions libsodium >/dev/null 2 >&1 )) ; then
3224 git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
3325 ( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX ; make check; make install)
3426 fi
Original file line number Diff line number Diff line change @@ -19,16 +19,8 @@ if [ -z $CURVE ]; then
1919elif [ $CURVE == " libsodium" ]; then
2020 CONFIG_OPTS+=(" --with-libsodium=yes" )
2121
22- if command -v dpkg-query > /dev/null 2>&1 ; then
23- dpkg-query --list libsodium-dev > /dev/null 2>&1
24- HAVE_SODIUM=$?
25- elif command -v brew > /dev/null 2>&1 ; then
26- brew ls --versions libsodium > /dev/null 2>&1
27- HAVE_SODIUM=$?
28- else
29- HAVE_SODIUM=1
30- fi
31- if [ $HAVE_SODIUM -ne 0 ]; then
22+ if ! (( command - v dpkg- query >/ dev/ null 2 >& 1 && dpkg- query -- list libsodium- dev >/ dev/ null 2 >& 1 ) || \
23+ (command -v brew >/dev/null 2 >&1 && brew ls --versions libsodium >/dev/null 2 >&1 )) ; then
3224 git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
3325 ( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX ; make check; make install)
3426 fi
Original file line number Diff line number Diff line change @@ -20,16 +20,8 @@ if [ $BUILD_TYPE == "default" ]; then
2020 elif [ $CURVE == " libsodium" ]; then
2121 CONFIG_OPTS+=(" --with-libsodium=yes" )
2222
23- if command -v dpkg-query > /dev/null 2>&1 ; then
24- dpkg-query --list libsodium-dev > /dev/null 2>&1
25- HAVE_SODIUM=$?
26- elif command -v brew > /dev/null 2>&1 ; then
27- brew ls --versions libsodium > /dev/null 2>&1
28- HAVE_SODIUM=$?
29- else
30- HAVE_SODIUM=1
31- fi
32- if [ $HAVE_SODIUM -ne 0 ]; then
23+ if ! (( command - v dpkg- query >/ dev/ null 2 >& 1 && dpkg- query -- list libsodium- dev >/ dev/ null 2 >& 1 ) || \
24+ (command -v brew >/dev/null 2 >&1 && brew ls --versions libsodium >/dev/null 2 >&1 )) ; then
3325 git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
3426 ( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX ; make check; make install)
3527 fi
You can’t perform that action at this time.
0 commit comments