#!/bin/sh
set -eux

# Required for properly running Git Annex, related issue:
# https://git-annex.branchable.com/bugs/assistant_crashes_in_TransferScanner/
export LANG=C.UTF-8
AWS_ACCESS_KEY_ID="$(cat ~/annex/secret/AWS/annex/key-id.txt)"
AWS_SECRET_ACCESS_KEY="$(cat ~/annex/secret/AWS/annex/access-key.txt)"
export AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY
# shellcheck source=/dev/null
. "${HOME}/.ssh/environment"

cd ~/annex/
git annex sync
