Skip to content

Instantly share code, notes, and snippets.

@svx
Last active January 11, 2016 18:15
Show Gist options
  • Select an option

  • Save svx/0ce0a0697ae372c3e044 to your computer and use it in GitHub Desktop.

Select an option

Save svx/0ce0a0697ae372c3e044 to your computer and use it in GitHub Desktop.
#!/bin/bash
doctest_update() {
docker pull quay.io/tiramisu/mr.docs
}
doctest() {
if [ -d "docs/_build" ]; then
sudo rm -rf docs/_build
fi
docker run -it --rm \
-v ${PWD}/docs:/build/docs:rw \
--name docs-test \
quay.io/tiramisu/mr.docs "$1"
sudo chown -R $USER docs
}
_doctest() {
local cur prev opts
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="html linkcheck spellcheck"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
}
complete -F _doctest doctest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment