#!/bin/sh
if [ "$(git branch | grep '* master')" = '* master' ]; then
if [ -f ././main.pdf ]; then
echo "File 'main.pdf' exists, trying to copy it to gh-pages branch"
else
exit 0
fi
cp ./main.pdf /delete_me.pdf
git checkout gh-pages
cp /delete_me.pdf ./main.pdf
git add ./main.pdf
rm -i /delete_me.pdf < y
git commit -a -mCopy
git checkout master
else
exit 0
fi
exit 0