#!/bin/bash -e # Ensure we are on master branch git checkout master # Generate documentation make doc (cd doc && asciidoc index.txt) # Checkout gh-pages git checkout gh-pages git pull # Copy doc to the right locations cp doc/index.html ./ cp msat.docdir/* ./dev/ # Add potentially new pages git add ./dev/* git add ./index.html # Commit it all & push git commit -m 'Doc update' git push # Get back to master branch git checkout master