From 750190eab94f4acbcde87344e884de79eb380b71 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Thu, 24 Sep 2009 14:44:00 +0200 Subject: [PATCH] Script to automatically build and upload docs. --- doc/push_github | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 doc/push_github diff --git a/doc/push_github b/doc/push_github new file mode 100755 index 00000000..4f28588b --- /dev/null +++ b/doc/push_github @@ -0,0 +1,37 @@ +# Make sure we start in the correct directory +if ! [[ -d ../.git ]]; then + echo "Call this script from the docs dir." + exit +fi + +ref=$(git symbolic-ref HEAD 2> /dev/null) +branch=${ref#refs/heads/} +wd=`pwd` + +make clean +make html +rm -rf /tmp/scikits.image.docs +cp -r build/html /tmp/scikits.image.docs +cd .. +git co gh-pages || exit +rm -rf ./* +cp -r /tmp/scikits.image.docs/* . +sed -i "" 's/_static/static/g' `find . -name "*.html"` +mv _static static +for f in `find . | grep "./" | grep -v ".git"`; do + git add $f +done + +echo "--------------------------------------" +git status +echo "--------------------------------------" + +echo "***" +echo "*** These changes are about to be committed. Press Ctrl-C to abort." +echo "*** Press enter to continue." +read + +git commit -m "Update docs." +git push origin +git co $branch +