#!/bin/bash
rm -rf repo remote_repo storage git_repo
mkdir repo remote_repo storage git_repo
pushd remote_repo
git init >> /dev/null && dvc init -q
set -x
set -e
echo data >> data
# dvc remote add -d str ../storage
dvc remote add -d str /full/path/to/storage
dvc add data
git add .dvc/config data.dvc .gitignore
git commit -m "add data"
dvc push
rm data
rm -rf .dvc/cache
popd
pushd repo
git init >> /dev/null && dvc init -q
dvc get ../remote_repo data
Will work just fine, but when we will use relpath to point to storage (as in commented line)
we will get warnings that cache files do not exist and data will not be created.
It is happening, because, in external_repo we clone url to /tmp and therefore, relative path to cache cannot be resolved properly.
Will work just fine, but when we will use relpath to point to storage (as in commented line)
we will get warnings that cache files do not exist and
datawill not be created.It is happening, because, in
external_repowe clone url to/tmpand therefore, relative path to cache cannot be resolved properly.