build_nim.sh: Nim cloning now works with no cache dir present

This commit is contained in:
Ștefan Talpalaru 2019-06-12 19:41:31 +02:00
parent b093d42b20
commit 452419318c
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
1 changed files with 4 additions and 3 deletions

View File

@ -39,10 +39,11 @@ nim_needs_rebuilding() {
REBUILD=0
NO_REBUILD=1
if [[ ! -e "$NIM_DIR" ]]; then
git clone --depth=1 https://github.com/status-im/Nim.git "$NIM_DIR"
fi
if [[ -n "$CI_CACHE" && -d "$CI_CACHE" ]]; then
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/ || true # let this one fail with an empty cache dir
fi