diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-24 22:14:32 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-24 22:37:36 +0300 |
commit | 85903cb0e6a2428c5a071ed78b12a9f95e56792b (patch) | |
tree | 5859115cfa78a3617106d58e355a11f196397839 /ci/common/build.sh | |
parent | 4ccef05829bc9956207299215672c2e8c3e51c43 (diff) | |
download | rneovim-85903cb0e6a2428c5a071ed78b12a9f95e56792b.tar.gz rneovim-85903cb0e6a2428c5a071ed78b12a9f95e56792b.tar.bz2 rneovim-85903cb0e6a2428c5a071ed78b12a9f95e56792b.zip |
ci: Make scripts in common be dash-compatible
`ulimit` may still be not present: dash and busybox support it, but posh does
not.
Diffstat (limited to 'ci/common/build.sh')
-rw-r--r-- | ci/common/build.sh | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/ci/common/build.sh b/ci/common/build.sh index 129622b522..56c24bb3fb 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -7,10 +7,10 @@ build_make() { } build_deps() { - if [[ "${BUILD_32BIT}" == ON ]]; then + if test "x${BUILD_32BIT}" = xON ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi - if [[ "${FUNCTIONALTEST}" == "functionaltest-lua" ]]; then + if test "x${FUNCTIONALTEST}" = "xfunctionaltest-lua" ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON" fi @@ -18,16 +18,15 @@ build_deps() { # If there is a valid cache and we're not forced to recompile, # use cached third-party dependencies. - if [[ -f "${CACHE_MARKER}" ]] && [[ "${BUILD_NVIM_DEPS}" != true ]]; then - if [[ "${TRAVIS_OS_NAME}" == osx ]]; then - local statcmd="stat -f '%Sm'" - else - local statcmd="stat -c '%y'" + if test -f "${CACHE_MARKER}" && test "x${BUILD_NVIM_DEPS}" != xtrue ; then + local statcmd="stat -c '%y'" + if test "x${TRAVIS_OS_NAME}" = xosx ; then + statcmd="stat -f '%Sm'" fi echo "Using third-party dependencies from Travis's cache (last updated: $(${statcmd} "${CACHE_MARKER}"))." - mkdir -p "$(dirname "${DEPS_BUILD_DIR}")" - mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" + mkdir -p "$(dirname "${DEPS_BUILD_DIR}")" + mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" else mkdir -p "${DEPS_BUILD_DIR}" fi @@ -46,10 +45,10 @@ build_deps() { } prepare_build() { - if [[ -n "${CLANG_SANITIZER}" ]]; then + if test -n "${CLANG_SANITIZER}" ; then CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON" fi - if [[ "${BUILD_32BIT}" == ON ]]; then + if test "x${BUILD_32BIT}" = xON ; then CMAKE_FLAGS="${CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi @@ -61,24 +60,24 @@ prepare_build() { build_nvim() { echo "Building nvim." - if ! top_make nvim; then + if ! top_make nvim ; then exit 1 fi - if [ "$CLANG_SANITIZER" != "TSAN" ]; then + if test "x$CLANG_SANITIZER" != xTSAN ; then echo "Building libnvim." - if ! top_make libnvim; then + if ! top_make libnvim ; then exit 1 fi echo "Building nvim-test." - if ! top_make nvim-test; then + if ! top_make nvim-test ; then exit 1 fi fi # Invoke nvim to trigger *San early. - if ! (bin/nvim --version && bin/nvim -u NONE -e -c ':qall'); then + if ! (bin/nvim --version && bin/nvim -u NONE -e -c ':qall') ; then asan_check "${LOG_DIR}" exit 1 fi |