2018-06-30 21:51:15 -07:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
[[ -n "$CARGO_TARGET_CACHE_NAME" ]] || exit 0
|
|
|
|
|
|
|
|
#
|
|
|
|
# Restore target/ from the previous CI build on this machine
|
|
|
|
#
|
|
|
|
(
|
|
|
|
d=$HOME/cargo-target-cache/"$CARGO_TARGET_CACHE_NAME"
|
2018-07-04 10:26:32 -07:00
|
|
|
mkdir -p "$d"/target
|
2018-06-30 21:51:15 -07:00
|
|
|
set -x
|
2018-07-04 10:26:32 -07:00
|
|
|
rsync -a --delete --link-dest="$d" "$d"/target .
|
2018-06-30 21:51:15 -07:00
|
|
|
)
|