github.com/uber/kraken@v0.1.4/scripts/mkdocs.sh (about)

     1  #!/bin/bash
     2  
     3  set -e
     4  cd $(dirname "${BASH_SOURCE[0]}")/..
     5  
     6  # Setup virtualenv if not exists
     7  if [ ! -d env ]; then
     8      virtualenv env
     9  fi
    10  
    11  # Active virtualenv
    12  . env/bin/activate
    13  
    14  # Install pip requirements for the deployment script
    15  pip install -q -r requirements-docs.txt
    16  
    17  # Generate docs/index.md file automatically from README.md
    18  cat README.md | sed 's/(docs\//(/g' > docs/index.md
    19  
    20  # Run the mkdocs tool
    21  echo "cmd is $@"
    22  mkdocs "$@"
    23  
    24  # Exit virtualenv
    25  deactivate