build_nim.sh: handle an empty CI cache dir

This commit is contained in:
Ștefan Talpalaru 2019-06-12 18:41:04 +02:00
parent 22ada660b0
commit 3965cf91f7
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9

View File

@ -43,7 +43,7 @@ nim_needs_rebuilding() {
if [[ ! -e "$NIM_DIR" ]]; then
git clone --depth=1 https://github.com/status-im/Nim.git "$NIM_DIR"
fi
cp -a "$CI_CACHE"/* "$NIM_DIR"/bin/
cp -a "$CI_CACHE"/* "$NIM_DIR"/bin/ || true # let this one fail with an empty cache dir
fi
# compare binary mtime to the date of the last commit (keep in mind that Git doesn't preserve file timestamps)