replace which

centos:centos7 docker minimal image does not provide which (although centos:centos6 minimal image does)
This commit is contained in:
Tru Huynh 2018-02-23 22:43:34 +01:00 committed by GitHub
parent 31554e0d0e
commit f7e72b4278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ mkdir build || exit 1
cd build || exit 1
# some environments have cmake v2 as 'cmake' and v3 as 'cmake3'
# check for cmake3 first then fallback to just cmake
B_CMAKE=`which cmake3 2>/dev/null`
`type cmake3 >> /dev/null` && B_CMAKE=`type cmake3 | cut -d ' ' -f 3`
[ $? -ne 0 -o "x$B_CMAKE" = "x" ] && B_CMAKE=cmake
# default build configuration
B_BUILD_TYPE=${B_BUILD_TYPE:-Debug}