1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/usr/bin/env bash set -e whoami export LANG=en_US.UTF-8 unset GIT_DIR if ! git merge-base --is-ancestor master pre-generated; then dir="$(mktemp --tmpdir -d www-generate.XXXXXXXXXX)" git clone "$PWD" "$dir" pushd "$dir" bin/pre-generate git push origin pre-generated popd rm -rf -- "$dir" fi cd /srv/http/www.andrewdm.me git pull --ff-only