#!/usr/bin/env bash

if [ -f .hugo_upload ]; then 
  source .hugo_upload

  rm -r public/
  hugo --quiet

  rsync -rtvzP public/ "$user@$host:$target_dir"
else
  echo ".hugo_upload file not found in $(pwd)"
fi