diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-03-11 20:15:30 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-03-11 20:29:20 +0100 |
commit | c7f95fde1bb1d1a245ad015be10aa4d23fc48899 (patch) | |
tree | ac6c5370e06f3117164aeb07f942de9d362e55a8 /ci/common | |
parent | 241c380da93835081e2c1a072d0a281245dd0af4 (diff) | |
download | rneovim-c7f95fde1bb1d1a245ad015be10aa4d23fc48899.tar.gz rneovim-c7f95fde1bb1d1a245ad015be10aa4d23fc48899.tar.bz2 rneovim-c7f95fde1bb1d1a245ad015be10aa4d23fc48899.zip |
ci/travis: Don't destroy cache during prepare
Use `cp -r` instead of `mv`.
Remove use of `dirname`, that was missed in 10cdf8c28621.
closes #5166
Diffstat (limited to 'ci/common')
-rw-r--r-- | ci/common/build.sh | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/ci/common/build.sh b/ci/common/build.sh index 772b696969..5b719940ab 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -1,3 +1,11 @@ +_stat() { + if test "${TRAVIS_OS_NAME}" = osx ; then + stat -f %Sm "${@}" + else + stat -c %y "${@}" + fi +} + top_make() { echo '================================================================================' # Travis has 1.5 virtual cores according to: @@ -19,19 +27,12 @@ build_deps() { fi rm -rf "${DEPS_BUILD_DIR}" + mkdir -p "${DEPS_BUILD_DIR}" # Use cached dependencies if $CACHE_MARKER exists. if test -f "${CACHE_MARKER}" && ! test "${CACHE_ENABLE}" = "false" ; then - local statcmd="stat -c '%y'" - if test "${TRAVIS_OS_NAME}" = osx ; then - statcmd="stat -f '%Sm'" - fi - echo "Using third-party dependencies from Travis cache (last update: $(${statcmd} "${CACHE_MARKER}"))." - - mkdir -p "$(dirname "${DEPS_BUILD_DIR}")" - mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" - else - mkdir -p "${DEPS_BUILD_DIR}" + echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))." + cp -r "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" fi # Even if we're using cached dependencies, run CMake and make to |