improvements to travis setup -- cache, use command -v

This commit is contained in:
Niko Matsakis 2018-01-19 14:48:35 -05:00
parent 246dee63e4
commit 864a71fda0
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,8 @@
language: rust
cache: pip
cache:
- pip
- cargo
install:
- source ~/.cargo/env || true

View File

@ -1,7 +1,9 @@
#!/bin/bash
set -ex
cargo install cargo install mdbook --vers "0.0.28"
if command -v mdbook >/dev/null 2>&1; then
cargo install mdbook --vers "0.0.28"
fi
if command -v ghp-import >/dev/null 2>&1; then
pip install ghp-import