| 1 | #!/bin/bash |
| 2 | # Test script to drive the example external remote |
| 3 | |
| 4 | set -eu -o pipefail -x |
| 5 | |
| 6 | cd $(dirname "$0") |
| 7 | |
| 8 | export PATH=$PWD:$PATH |
| 9 | |
| 10 | git-annex-remote-directory < /dev/null | grep VERSION |
| 11 | |
| 12 | TMP="$(mktemp -d "${TMPDIR:-/tmp}/gar-XXXXXXX")" |
| 13 | # so there is no global git config side-effects |
| 14 | export HOME="$TMP" |
| 15 | |
| 16 | REMOTE_DIR="$TMP/remote" |
| 17 | REPO_DIR="$TMP/repo" |
| 18 | mkdir -p "$REMOTE_DIR" |
| 19 | mkdir -p "$REPO_DIR" |
| 20 | |
| 21 | cd "$REPO_DIR" |
| 22 | git init |
| 23 | git config user.email "[email protected]" |
| 24 | git config user.name "Some User" |
| 25 | git annex init |
| 26 | git annex initremote --verbose --debug directory_remote type=external externaltype=directory encryption=none directory=$REMOTE_DIR |
| 27 | git annex testremote --verbose --debug directory_remote 2>&1 | tail -n 1000 |