#!/usr/bin/env bash

SCRIPT_DIR=$(dirname $(realpath $0))
BOOK_DIR=${SCRIPT_DIR/\/.Books/}

cd $BOOK_DIR && git add .
git commit -m "Saved at $(date) from $(hostname)"
git push #&& find /tmp/manuskriptbackups/ -cmin +60 | xargs -I% rm -f %

if [[ -e "$SCRIPT_DIR/local.d/postupload.sh" ]]; then
  $SCRIPT_DIR/local.d/postupload.sh
fi
