Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Updated buildDocs.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rozza committed Jan 18, 2013
1 parent 84772a4 commit f3f195f
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions buildDocs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
#!/bin/sh
usage()
{
cat << EOF
usage: $0 options
This script generates the casbah documentation
OPTIONS:
-h Show this message
-g Auto update the gh-pages branch
EOF
}

GHPAGES=false
while getopts "h:g" OPTION
do
case $OPTION in
h)
usage
exit 1
;;
g)
GHPAGES=$OPTARG
;;
?)
usage
exit
;;
esac
done

SCALA=2.9.2
WEBSITE_ROOT=rozza.github.com/casbah/
Expand Down Expand Up @@ -30,7 +60,7 @@ make -C $SPHINX_DIR clean epub latexpdf
cp $SPHINX_DIR/_build/epub/CasbahMongoDBScalaToolkitDocumentation.epub $SITE_DIR/CasbahDocumentation.epub
cp $SPHINX_DIR/_build/latex/CasbahDocumentation.pdf $SITE_DIR/CasbahDocumentation.pdf

if git diff-index --quiet HEAD --; then
if $GHPAGES && git diff-index --quiet HEAD --; then
echo " ========================== "
echo " Updating `gh-pages` branch"
echo " ========================== "
Expand All @@ -42,7 +72,7 @@ if git diff-index --quiet HEAD --; then
mv .target target

echo " Please check the new docs and checkin ..."
else
elif $GHPAGES; then
echo "You have changes not checked-in - cannot automatically update gh-pages"
fi

Expand Down

0 comments on commit f3f195f

Please sign in to comment.