mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 22:53:30 +08:00
38 lines
823 B
Plaintext
Executable File
38 lines
823 B
Plaintext
Executable File
# 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 gh-pages
|
|
git co $branch
|
|
|