Skip to content
Snippets Groups Projects
Commit 0f2ea046 authored by Matt Traudt's avatar Matt Traudt
Browse files

Add script that call be called from cron to update the docs html

parent 7599e9d0
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
set -e
function cleanup {
echo -n ''
}
trap cleanup EXIT
function fail_hard {
echo "$1"
exit 1
}
make=$(which gmake &>/dev/null && echo "gmake" || echo "make")
venv=$(pwd)/venv
sbws_repo="$1"
[ -d "$venv" ] || fail_hard "$venv doesn't exist"
[ ! -z "$sbws_repo" ] || fail_hard "$0 <sbws_repo>"
[ -d "$sbws_repo" ] || fail_hard "$sbws_repo doesn't exist"
pushd "$sbws_repo"
git pull
source "$venv/bin/activate"
pip install -U --upgrade-strategy eager .[doc]
pushd docs
$make html
popd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment