#!/usr/bin/env zsh

LOG="$HOME/update-vault.log"

exec > >(tee -i ${LOG})
exec 2>&1

echo "# Starting update vault: $(date)"

pushd ~/Documents/vaults/kjuulh/ || return 1

git add .

git commit -m "auto commit"

git pull origin main --rebase

git push

popd || return 1

echo "Finished update vault: $(date)"
