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

Commit

Permalink
Fix removal of home (oops)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukassnoek committed Mar 7, 2017
1 parent 5e379db commit a384e76
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/update_and_push_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

dest=$1
cbranch=`git symbolic-ref HEAD | sed 's!refs\/heads\/!!'`
rootdir=`pwd`

if [ $dest == 'rtd' ]; then
echo "Updating docs for branch '$cbranch' and pushing to origin & ReadTheDocs"
Expand All @@ -17,9 +18,14 @@ else
cd docs
make clean
make html
cd build/html
cd _build/html
tar czf /tmp/html.tgz .
cd ../../.. # go back to root dir
cd ../$rootdir # go back to root dir

if [ `pwd` == $HOME ]; then
echo 'We are in home! Exit!'
exit
fi

gh_pages=`git ls-remote --heads git@github.com:lukassnoek/skbold.git gh-pages | wc -l`

Expand All @@ -30,7 +36,7 @@ else
fi

git rm -rf .
find . -path ./.git -prune -o -exec rm -rf {} \; 2> /dev/null
rm -rf docs/ skbold*/ img/ bin/ LICENSE *.in *.rst *.txt *.py
tar xzf /tmp/html.tgz
git add .
git commit -m "Updating docs for $cbranch and pushing to origin & gh-pages branch"
Expand Down

0 comments on commit a384e76

Please sign in to comment.