#!/bin/bash set -eu fetch () { git clean -fdx git fetch # reset to updated upstream branch, but only if we're tracking a branch branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo head) git reset --hard "$branch" } # Remove local path re: using global buildbot-worker not pip local install #export PATH=$HOME/.local/bin:$PATH #logfile="/tmp/sphinx-warnings.log" #if [ -f "$logfile" ] # then # echo # echo $logfile " exists. Removing." # rm $logfile # else # echo "Info: existing log file '$logfile' not found." #fi cd $HOME/docs fetch make html make latexpdf mkdir -p $HOME/build/docs/html/ mkdir -p $HOME/build/docs/pdf/ cp -r _build/html/* $HOME/build/docs/html/ cp -r _build/latex/*.pdf $HOME/build/docs/pdf/ #cat $logfile